Re: TK

2003-09-19 Thread Todd W.
"Paul Kraus" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > Am I able to write a network app say on one of my Linux servers? Then > provide a gui that would run on the w32 workstations? Do I have to > install perl / tk on all of the workstations to do this? > Sure you can, if you

install Tk800.025 no 'ClientWin.o' file

2003-09-19 Thread Ying Liu
Hi all, I am trying to install the Tk800.025 package, it told me: ar: ClientWin.o: No such file or directory make[1]: *** [libpTk.a] Error 1 make[1]: Leaving directory `/mz/hd/liuyi/local/Tk800.025/pTk' make: *** [pTk/libpTk.a] Error 2 I use gcc and it said 'unrecognized option'-KPIC'. What's th

Re: Recursively scanning a directory on Mac OS X for size & Timestap

2003-09-19 Thread John W. Krahn
Shishir Saxena wrote: > > Hi, Hello, > I'm doing the following and the purpose is to genrate a HTML log file. But > the script says "Can not apply stat : No such file or directory found" > Can someone plz tell me where I'm going wrong ? use warnings; use strict; > use File::Find; > use File::s

Re: Read Directory Name

2003-09-19 Thread John W. Krahn
Dumitru Orza wrote: > > Hello all, Hello, > is there any way to assign names of directories to a list ? opendir DIR, '.' or die "Cannot open the current directory: $!"; my @dirs = grep -d, readdir DIR; closedir DIR; > Ideea is to check the existance of some directories and not create them aga

manipulate Win2K IP/subnet/DNS?

2003-09-19 Thread Chris McMahon
Hello again... Jenda pointed me to the Win32::FileOp module (thanks!) to manipulate drives; now I wonder if it's possible to manipulate the local "Internet Protocol (TCP/IP)" settings: IP address; Subnet mask; Default gateway; DNS servers. I've been surfing CPAN without success

Re: list-parsing problem

2003-09-19 Thread John W. Krahn
Marcus Claesson wrote: > > Hi People, Hello, > I have a silly little list-parsing problem that I can't get my head > around, and I'm sure some of you have come across it before. > > I have a list like this: > > 1 a > 2 b > 2 c > 3 a > 4 d > 4 d > 4 e >

RE: TK

2003-09-19 Thread Paul Kraus
Yep. Thanks. I just assumed it would not have been included. Paul -Original Message- From: Akens, Anthony [mailto:[EMAIL PROTECTED] Sent: Friday, September 19, 2003 12:53 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: RE: TK I think that TK is included in AS perl for windows.

RE: TK

2003-09-19 Thread Akens, Anthony
I think that TK is included in AS perl for windows. I copied Paul privately with a sample Perl TK script to try, so he'll know if he has it. (I was surprised to find that I did!) Didn't want to copy it on to the list, it's a bit large (20k) to flood the list with. (It's the game "Same Game" done

RE: TK

2003-09-19 Thread Dan Anderson
On Fri, 2003-09-19 at 12:17, Paul Kraus wrote: > First of I never even knew about safari until today :( Talk about money > I could have saved At any rate. HeheheI feel your pain. I calculated the price of my entire bookshelf when I found safari and nearly broke down into tears. > I can't

RE: TK

2003-09-19 Thread Paul Kraus
First of I never even knew about safari until today :( Talk about money I could have saved At any rate. I can't seem to find tk via ppm for AS perl. Any suggestions on where to get it? I can't really compile on w32. I am missing the c libraries and a compiler. Am I able to write a network ap

Re: Split based on length

2003-09-19 Thread Rob Dixon
Nyimi Jose wrote: > > I need some explanation on following: > > 1. my skill of perl tells me so far to handle exceptions and write : > open(FH,$file) || die "can not open $file : $! \n"; > I've tried your code with a wrong file_name and got following message: > "Can't open in.txt1: No such file or

RE: TK

2003-09-19 Thread NYIMI Jose (BMB)
Are limitations of Perl/Tk listed some where ? José. -Original Message- From: zentara [mailto:[EMAIL PROTECTED] Sent: Friday, September 19, 2003 5:27 PM To: [EMAIL PROTECTED] Subject: Re: TK On Fri, 19 Sep 2003 08:13:19 -0400, [EMAIL PROTECTED] (Paul Kraus) wrote: >I saw someone menti

Re: bitwise xor of two long bitstrings

2003-09-19 Thread Dan Anderson
Could you just create two arrays, @comp1 and @comp2 . Then run a foreach loop for every char in the string and push @comp1, @char_from_a, do the same for $b, and then foreach pop out the front see whether they compare? -Dan On Fri, 2003-09-19 at 00:47, Jian Kang wrote: > I got a problem of findi

Re: TK

2003-09-19 Thread Dan Anderson
> 1. Get the book Mastering Perl/Tk. It is very good. You can get > it on Safari if you are in a hurry or want an online version. Get it on safari no matter what. $15 a month for 10 books is so much better then shelling out $50 a computer book every time you need to learn some new tricks. s

RE: Split based on length

2003-09-19 Thread NYIMI Jose (BMB)
I need some explanation on following: 1. my skill of perl tells me so far to handle exceptions and write : open(FH,$file) || die "can not open $file : $! \n"; I've tried your code with a wrong file_name and got following message: "Can't open in.txt1: No such file or directory at parser2.pl line 22

Re: Split based on length

2003-09-19 Thread Rob Dixon
Nyimi Jose wrote: > > IMHO > $string =~ /.{1,$len}/g; > Is the best suggestion i have seen so far ;) > > I have an other request : "code review" :-) > Below is my final code. > I'm sure that you guys will find > Some better style to write it ... > > #!/usr/local/bin/perl -w > use strict; > #---

Re: bitwise xor of two long bitstrings

2003-09-19 Thread Rob Dixon
Jian Kang wrote: > > I got a problem of finding the difference of two > bit(binary) strings, > > eg: > $a = "01"; > $b = "11"; > > differs by: 1 > > Is there a good way to solve this when $a and $b are > very long, like: > $a = "00111010011110010" > $b = "1110110101011110010

Re: checking for anything other than a number

2003-09-19 Thread Rob Dixon
Dan wrote: > i have a string $limit and i need to check it contains numbers and nothing > else. > > i thought ($limit !~ /\d/) did the job, since i used to be good at this, > i've slacked the last 6 months or so, and forgotten some of the more obvious > things. when i find out, i'll probably slap m

Re: checking for anything other than a number

2003-09-19 Thread Jeff 'japhy' Pinyan
On Sep 19, dan said: >i have a string $limit and i need to check it contains numbers and nothing >else. > >i thought ($limit !~ /\d/) did the job, since i used to be good at this, >i've slacked the last 6 months or so, and forgotten some of the more obvious >things. when i find out, i'll probably

Re: avoid repitive code while sorting hash arrays

2003-09-19 Thread Rob Dixon
Ramprasad wrote: > > Rob Dixon wrote: > > > > > > Will this do? > > > > sort { > > my ($va, $vb) = map $$hash{$_}{$sortkey}, $direction eq 'a' ? ($a, $b) : ($b, > > $a); > > $sortkey eq 'uname' ? $va cmp $vb : $va <=> $vb; > > } keys %$hash; > > > > Cheers, > > > > Rob > > > > > > Gr8 Now the

checking for anything other than a number

2003-09-19 Thread dan
i have a string $limit and i need to check it contains numbers and nothing else. i thought ($limit !~ /\d/) did the job, since i used to be good at this, i've slacked the last 6 months or so, and forgotten some of the more obvious things. when i find out, i'll probably slap myself and go "ahh that

Re: bitwise xor of two long bitstrings

2003-09-19 Thread Jeff 'japhy' Pinyan
On Sep 18, Jian Kang said: >eg: >$a = "01"; >$b = "11"; > >differs by: 1 So why can't you use the ^ (xor) operator? -- Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/ RPI Acacia brother #734 http://www.perlmonks.org/ http://www.cpan.org/ what does y/// stand fo

bitwise xor of two long bitstrings

2003-09-19 Thread Jian Kang
I got a problem of finding the difference of two bit(binary) strings, eg: $a = "01"; $b = "11"; differs by: 1 Is there a good way to solve this when $a and $b are very long, like: $a = "00111010011110010" $b = "1110110101011110010010010" I used 'vec' function to extract

Re: Single and Double quotes in SQL

2003-09-19 Thread Robert J Taylor
Since you're sending this to the Perl list I will assume you're using DBI::mysql to interface with MySQL. Use the DBI method "quote()", as in: # assuming: # my $dbh = DBI->connect(...) has gone before $dbh->quote($Value); Here's a little sub routine I picked up from CodeCharge a while

Re: Single and Double quotes in SQL

2003-09-19 Thread Robert J Taylor
Since you're sending this to the Perl list I will assume you're using DBI::mysql to interface with MySQL. Use the DBI method "quote()", as in: # assuming: # my $dbh = DBI->connect(...) has gone before $dbh->quote($Value); Here's a little sub routine I picked up from CodeCharge a while

Slide Show

2003-09-19 Thread Joseph Ruffino
Hi, I've looked in a few books, but can't seem to find what I want. Can someone point me in the right direction to create a multi-image slide show. I know I can open a directory and readin in the data, but how can I or should I put the image in a box to view either on an html page or just in

Re: avoid repitive code while sorting hash arrays

2003-09-19 Thread Ramprasad A Padmanabhan
Rob Dixon wrote: Ramprasad wrote: suppose I have a hash like %users =( 'cvs' => { 'uname' => 'cvs', 'uid' => 582, 'gid' => 500 }, 'radvd' => { 'uname' => '

RE: list-parsing problem

2003-09-19 Thread EUROSPACE SZARINDAR
Hi, Be careful with the "sort keys %unique" because if the list is bigger like that : __DATA__ 1 a 2 b 2 c 3 a 4 d 4 d 4 e 4 f 5 g 8 f 10 e 10 y you will get : 1 a 10 e,y <== I don't think you are looking for that

Re: avoid repitive code while sorting hash arrays

2003-09-19 Thread Chuck Fox
Rob and all the other perl wonder workers who contribute to this list, Awesome, While I have been reading and writing perl for a few years now, I am always amazed at the code reduction that can occur when you properly apply the power of perl. This is the most instructive forum that I have ever

RE: list-parsing problem

2003-09-19 Thread Thomas Bätzler
Marcus Claesson [mailto:[EMAIL PROTECTED] asked: > I have a silly little list-parsing problem that I can't get my head > around, and I'm sure some of you have come across it before. Sure. Looks like homework ;-) HTH, Thomas #!/usr/bin/perl -w use strict; my %unique; while( ){ my( $key, $va

RE: list-parsing problem

2003-09-19 Thread EUROSPACE SZARINDAR
Hi Marcus Just look at the perldoc perlreftut. What you are looking for is the exact exemple of the paper. Michel -Message d'origine- De: Marcus Claesson [mailto:[EMAIL PROTECTED] Date: jeudi 18 septembre 2003 11:26 À: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] Objet: li

Re: more perlboot questions

2003-09-19 Thread sfryer
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Okay ... ignore my last questions. Seems the list-server is a bit slow today, so after a few hours banging away, I figured it out by a combination of trial & error + RTFMs (solution below). { package Generic; sub MkInstance { my $cl

more perlboot questions

2003-09-19 Thread sfryer
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Thanks to Jeff and George for help with my last question! Now, say I make an instance as follows... { package Generic; sub MakeInstance { my $class = shift; my $name = shift; bless \$name, $class; } } {

RE: Apache 1.3 config problem

2003-09-19 Thread Robert J Taylor
- Original Message - From: "Devin B. Hedge" <[EMAIL PROTECTED]> To: "'Robert J Taylor'" <[EMAIL PROTECTED]> Sent: Wednesday, September 17, 2003 3:38 PM Subject: RE: Apache 1.3 config problem > Robert, > Thanks for your help. I've been struggling with describing my intent for a > few days

Re: Apache 1.3 config problem

2003-09-19 Thread Robert J Taylor
- Original Message - From: "Robert J Taylor" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Wednesday, September 17, 2003 2:28 PM Subject: Re: Apache 1.3 config problem Sorry - at least one error : "/www/myfirstweb/htdocs" should have been "/home/devin-com/public_

RE: instance variables?

2003-09-19 Thread NYIMI Jose (BMB)
If you are tired typing "my $self = shift;" There are modules out there that can build class for you. http://search.cpan.org/search?query=Class%3A%3AStruct&mode=module I'm using Class::Struct module coming with perl. José. -Original Message- From: Kevin Pfeiffer [mailto:[EMAIL PROTECTED]

TK

2003-09-19 Thread Paul Kraus
I saw someone mention that tk was the better route to go for a UI then a web interface. I have several office applications that I have written that I was going to write html interfaces for. I would love to avoid having to learn web development to :) Can anyone give me a break down on what tk is and

Re: avoid repitive code while sorting hash arrays

2003-09-19 Thread Rob Dixon
Ramprasad wrote: > suppose I have a hash like > > %users =( >'cvs' => { > 'uname' => 'cvs', > 'uid' => 582, > 'gid' => 500 > }, > 'radvd' => { > 'un

Re: WIN32 Services / Scheduled Tasks

2003-09-19 Thread Jenda Krynicky
From: "Jones, Jeremy" <[EMAIL PROTECTED]> > I'm trying to find a way (IF any exists) to influence the properties > of Windows Services and the Scheduled Tasks; i.e. : > The ability to enable/disable (and possibly set as Start Automatic) a > Windows Service from Perl, perldoc Win32::Service > an

Read Directory Name

2003-09-19 Thread Dumitru Orza
Hello all, is there any way to assign names of directories to a list ? Ideea is to check the existance of some directories and not create them again. Thank you, Orza

WIN32 Services / Scheduled Tasks

2003-09-19 Thread Jones, Jeremy
Hi-All I'm trying to find a way (IF any exists) to influence the properties of Windows Services and the Scheduled Tasks; i.e. : The ability to enable/disable (and possibly set as Start Automatic) a Windows Service from Perl,and approximatly the same with the Task Scheduler (Set T

avoid repitive code while sorting hash arrays

2003-09-19 Thread Ramprasad A Padmanabhan
suppose I have a hash like %users =( 'cvs' => { 'uname' => 'cvs', 'uid' => 582, 'gid' => 500 }, 'radvd' => { 'uname' => 'radvd', 'u

RE: Split based on length

2003-09-19 Thread NYIMI Jose (BMB)
IMHO $string =~ /.{1,$len}/g; Is the best suggestion i have seen so far ;) I have an other request : "code review" :-) Below is my final code. I'm sure that you guys will find Some better style to write it ... #!/usr/local/bin/perl -w use strict; #-- #Global variables #---