RE: Hash of Arrays

2005-09-23 Thread Jim
> > The part that confuses me is: > > ($who, $rest) = split /:\s*/, $line, 2; > > I understand that it takes the input and splits it into two > parts along the regular expression, but I can't figure out > what the 2 means. > split the expression into a maximum of 2 perldoc -f split --

Re: IO::FILE

2005-09-23 Thread John W. Krahn
Matthew Sacks wrote: > Greetings, Hello, > The below examples are from the CPAN page on IO::FILE. > If understand them, the examples are always printing to the > handle, even if the file was opened for readonly? No, the first and third examples are printing to STDOUT. > Are some of these exampl

4perl regexp from command line argument

2005-09-23 Thread Ling F. Zhang
hiall: I am writing a regexp rename script as an exercise for learning perl. Here's what it's suppose to do: regren.pl "REGEXP1" "REGEXP2" would do $ARG1 = shift @ARGV; $ARG2 = shift @ARGV; // some code to obtain a filename list and loop: $filename =~ s/$ARG1/$ARG2/ and rename the file accordi

IO::FILE

2005-09-23 Thread Matthew Sacks
Greetings, The below examples are from the CPAN page on IO::FILE. If understand them, the examples are always printing to the handle, even if the file was opened for readonly? Are some of these examples expected to fail (and raise exceptions)? Why does he have to autoflush at the end? matthew

Re: tsv

2005-09-23 Thread Wiggins d'Anconia
Matthew Sacks wrote: > Hello Folks, > > Has anybody used Data::Table? > > I am specifically interested munching some huge tab separated file. When > reading/writing it, I want to be very strict about what characters comprise > valid data. > > Suggestions? > > -matthew > Text::CVS_XS is

tsv

2005-09-23 Thread Matthew Sacks
Hello Folks, Has anybody used Data::Table? I am specifically interested munching some huge tab separated file. When reading/writing it, I want to be very strict about what characters comprise valid data. Suggestions? -matthew - Yahoo! for

Re: Looking for perl scripts to remove ^M

2005-09-23 Thread Jay Savage
On 9/23/05, Ryan Frantz <[EMAIL PROTECTED]> wrote: > > > > -Original Message- > > From: Ankur Gupta [mailto:[EMAIL PROTECTED] > > Sent: Friday, September 23, 2005 2:48 PM > > To: Dave Adams > > Cc: beginners perl > > Subject: Re: Looking for perl scripts to remove ^M > > > > On 9/23/2005 11

move applications from traditional CGI to mod_perl

2005-09-23 Thread Jeff Pan
hi,everyone, I want to move my web applications which written by traditional CGI to mod_perl.Is there any risk or difficulty here? The applications are something about webmail.Which module under mod_perl is suited for me? Any advise or reference to me should be appreciated.TKS. -- Jeff Pan [E

Re: Hash Problem

2005-09-23 Thread John W. Krahn
Ryan Frantz wrote: > Perlers, Hello, > I'm working on a small script that checks the free space on local fixed > drives on my system. Since there other drive types (i.e. floppy, > CD-ROM, network maps) I want to exclude those. I decided to use a hash > but the script still displays all of the d

RE: Hash Problem

2005-09-23 Thread Ryan Frantz
> -Original Message- > From: Jeff 'japhy' Pinyan [mailto:[EMAIL PROTECTED] > Sent: Friday, September 23, 2005 3:45 PM > To: Ryan Frantz > Cc: beginners perl > Subject: Re: Hash Problem > > On Sep 23, Ryan Frantz said: > > > I'm working on a small script that checks the free space on loc

Re: Hash Problem

2005-09-23 Thread Jeff 'japhy' Pinyan
On Sep 23, Ryan Frantz said: I'm working on a small script that checks the free space on local fixed drives on my system. Since there other drive types (i.e. floppy, CD-ROM, network maps) I want to exclude those. I decided to use a hash but the script still displays all of the drives on my sys

RE: Hash Problem

2005-09-23 Thread Ryan Frantz
> -Original Message- > From: Bakken, Luke [mailto:[EMAIL PROTECTED] > Sent: Friday, September 23, 2005 3:26 PM > To: Ryan Frantz > Subject: RE: Hash Problem > > Ryan Frantz wrote: > > > my %ignoreDriveTypes = ( > > 'floppy' => '2', > > 'network' => '4', > > 'cdROM' => '5', > >

Hash Problem

2005-09-23 Thread Ryan Frantz
Perlers, I'm working on a small script that checks the free space on local fixed drives on my system. Since there other drive types (i.e. floppy, CD-ROM, network maps) I want to exclude those. I decided to use a hash but the script still displays all of the drives on my system. If I just use si

Re: Looking for perl scripts to remove ^M

2005-09-23 Thread Wiggins d'Anconia
Ryan Frantz wrote: > >>-Original Message- >>From: Ankur Gupta [mailto:[EMAIL PROTECTED] >>Sent: Friday, September 23, 2005 2:48 PM >>To: Dave Adams >>Cc: beginners perl >>Subject: Re: Looking for perl scripts to remove ^M >> >>On 9/23/2005 11:28 PM Dave Adams wrote: >> >> >>>Sometimes I ge

ulimit and system command

2005-09-23 Thread steve tran
Hello I am noticing a strange phenomenon and I would appreciate it if someone helped me understand it in my shell when I execute ulimit -a I get % ulimit -a time(seconds)unlimited file(blocks) unlimited data(kbytes) unlimited stack(kbytes)unlimited memory(kbytes

RE: Looking for perl scripts to remove ^M

2005-09-23 Thread Ryan Frantz
> -Original Message- > From: Ankur Gupta [mailto:[EMAIL PROTECTED] > Sent: Friday, September 23, 2005 2:48 PM > To: Dave Adams > Cc: beginners perl > Subject: Re: Looking for perl scripts to remove ^M > > On 9/23/2005 11:28 PM Dave Adams wrote: > > > Sometimes I get perl scripts that we

Re: Looking for perl scripts to remove ^M

2005-09-23 Thread Ankur Gupta
On 9/23/2005 11:28 PM Dave Adams wrote: Sometimes I get perl scripts that were developed on windows and then brought over to UNIX and the scripts contain all the pesky metacharacters of ^M and excessive blank lines. Does anyone have a simple script to clean these files up or suggestions? If y

Re: Formatted Read

2005-09-23 Thread John W. Krahn
r huber wrote: > Is the a formatted read in perl? I have fixed length > records that need to be split up into separate > fields/variables and there is no delimiter. I've > checked my perl book and can not find anything other > than doing a series of substr's. You can set the Input Record Separator

Re: Looking for perl scripts to remove ^M

2005-09-23 Thread Chris Devers
On Fri, 23 Sep 2005, Dave Adams wrote: > Sometimes I get perl scripts that were developed on windows and then > brought over to UNIX and the scripts contain all the pesky > metacharacters of ^M and excessive blank lines. > > Does anyone have a simple script to clean these files up or suggestions?

Re: Looking for perl scripts to remove ^M

2005-09-23 Thread Jeff 'japhy' Pinyan
On Sep 23, Dave Adams said: Sometimes I get perl scripts that were developed on windows and then brought over to UNIX and the scripts contain all the pesky metacharacters of ^M and excessive blank lines. Does anyone have a simple script to clean these files up or suggestions? Many unix platfo

RE: Looking for perl scripts to remove ^M

2005-09-23 Thread Ryan Frantz
> -Original Message- > From: Dave Adams [mailto:[EMAIL PROTECTED] > Sent: Friday, September 23, 2005 1:59 PM > To: beginners perl > Subject: Looking for perl scripts to remove ^M > > Sometimes I get perl scripts that were developed on windows and then > brought over to UNIX and the scrip

Looking for perl scripts to remove ^M

2005-09-23 Thread Dave Adams
Sometimes I get perl scripts that were developed on windows and then brought over to UNIX and the scripts contain all the pesky metacharacters of ^M and excessive blank lines. Does anyone have a simple script to clean these files up or suggestions? My appreciation in advance, DA -- To unsubscrib

Re: Formatted Read

2005-09-23 Thread Paul Johnson
On Fri, Sep 23, 2005 at 07:22:01AM -0700, r huber wrote: > Is the a formatted read in perl? I have fixed length > records that need to be split up into separate > fields/variables and there is no delimiter. I've > checked my perl book and can not find anything other > than doing a series of substr

Re: how do I grep and have the matched single line in perl variable

2005-09-23 Thread Manish Sapariya
Thanks a lot Jeff. Sorry for posting the partial code. I should take care next time. The error that I made was to receieve the output of `my_utility` in scalar my $out = `my_utitlity`. After changing it to list as my @out = `my_utility` and using grep on it worked like charm. I didnt correctly

Re: here tag and internal variable

2005-09-23 Thread Denis
>${$html_ref} .= <<"___HTML___"; > Content-type: text/html > > Transitional//EN" > "http://www.w3.org/TR/html4/loose.dtd";> > > > CONTENT="text/html; charset=iso-8859-1"> > Hotspot Tracker > HREF="$get_to_indexcss/hotspot.css" TYPE="text/css" > MEDIA="screen"> > > in t

Formatted Read

2005-09-23 Thread r huber
Is the a formatted read in perl? I have fixed length records that need to be split up into separate fields/variables and there is no delimiter. I've checked my perl book and can not find anything other than doing a series of substr's. Thanks, rj _

RE: trying to run net::ssh::perl have errors

2005-09-23 Thread O'Brien, Bill
Reinstall seems to work thanks Bill -Original Message- From: Wiggins d'Anconia [mailto:[EMAIL PROTECTED] Sent: Thursday, September 22, 2005 3:32 PM To: O'Brien, Bill; Perl Subject: Re: trying to run net::ssh::perl have errors Please bottom post... Please group reply so others can help a

Re: here tag and internal variable

2005-09-23 Thread Jeff 'japhy' Pinyan
On Sep 23, Frank Geueke, III said: text immediately following the variable name. How do I tell Perl that the text is not part of the variable name? Here's my code: You wrap the *name* of the variable in braces: print "${get_to_index}css/hotspot.css"; -- Jeff "japhy" Pinyan% How

Re: how do I grep and have the matched single line in perl variable

2005-09-23 Thread Jeff 'japhy' Pinyan
On Sep 23, Manish Sapariya said: I want to have pure perl equivalent of following: my $out = `my_utility | grep manish`; which will give me the lines containing manish in the output of my_utility in variable $out. You'd use the aptly-named grep() function in Perl to get only those elements

RE: here tag and internal variable

2005-09-23 Thread Larsen, Errin M HMMA/IT
Frank Geueke, III wrote: > Thanks for the help with the reverse if and else. I > ended up using a single line forward if on a > single line. Now my next question. I'm using a jumbo > here tag (I think that's what they're called) to add > html to a string. I need to use a variable within the >

how do I grep and have the matched single line in perl variable

2005-09-23 Thread Manish Sapariya
I want to have pure perl equivalent of following: my $out = `my_utility | grep manish`; which will give me the lines containing manish in the output of my_utility in variable $out. - my $out = doMyUtility(); # I dont know how to now grep on $out and process it the ma

here tag and internal variable

2005-09-23 Thread Frank Geueke, III
Thanks for the help with the reverse if and else. I ended up using a single line forward if on a single line. Now my next question. I'm using a jumbo here tag (I think that's what they're called) to add html to a string. I need to use a variable within the tag (done this before, no problem) bu

Re: reusing DBI statement handle

2005-09-23 Thread Jeff 'japhy' Pinyan
On Sep 23, Manish Sapariya said: In following db functions I am using returned "statement handle " and afterword just ignoring it and overwrite it with the newly returned value. Does this cause memory leak/ or any kind of resouce leak? Can I reuse statement handle in such a way? If not, what is

reusing DBI statement handle

2005-09-23 Thread Manish Sapariya
In following db functions I am using returned "statement handle " and afterword just ignoring it and overwrite it with the newly returned value. Does this cause memory leak/ or any kind of resouce leak? Can I reuse statement handle in such a way? If not, what is cleaner way to do it? ---

Re: Could [you] [please] tell me how to remove white spacees presentbetween delimiter[s]

2005-09-23 Thread Abhishek Dave
Hy, If i under stand clearly try this my $s="'123PS01A'~^ '123PS01B'~^ '123PS01C'~^ '123PS01D'~^"; my @abhi=split(/ /,$s); for ( my $i=0;$i<@abhi;$i++) { print $abhi[$i] . "\n"; } Abhishek Dave - Original Message - From: "Mayank Ahuja" <[EMAIL PROTECTED]> Newsgroups: