Re: \1 in character class?

2010-07-15 Thread C.DeRykus
On Jul 14, 2:59 pm, chas.ow...@gmail.com ("Chas. Owens") wrote: > On Wed, Jul 14, 2010 at 00:50, C.DeRykus wrote: > > snip>> s/(\w+)\s/$1 /g; > snip > > Neat.  Using the \K construct available in 5.10, you can even > > eliminate the need for the capture: > > >   s/  \w+  \K \s / /gx; > > snip > >

Re: \1 in character class?

2010-07-14 Thread Uri Guttman
> "BRH" == Bryan R Harris writes: BRH> I think most of the response pointed to "non-greedy" matches, is BRH> that right? Are those deprecated or discouraged? nope, they are very useful and stable (not experimental in the least). non-greedy vs greedy is one of those things that newbies a

Re: \1 in character class?

2010-07-14 Thread Bryan R Harris
Wow, an impressive set of responses -- thanks Erez, Chas, Chris, C., Shawn, and Jennifer. I think most of the response pointed to "non-greedy" matches, is that right? Are those deprecated or discouraged? Thanks again. - Bryan > On Wed, Jul 14, 2010 at 00:50, C.DeRykus wrote: > snip >>> s

Re: \1 in character class?

2010-07-14 Thread Chas. Owens
On Wed, Jul 14, 2010 at 00:50, C.DeRykus wrote: snip >> s/(\w+)\s/$1 /g; snip > Neat.  Using the \K construct available in 5.10, you can even > eliminate the need for the capture: > >   s/  \w+  \K \s / /gx; snip Yeah, but both of these are fragile, the following string won't work: data: "this,

Re: \1 in character class?

2010-07-14 Thread C.DeRykus
On Jul 13, 8:09 am, jonesharring...@gmail.com (Jennifer Jones Harrington) wrote: > How about... > > #!/usr/bin/perl > use warnings; > $_ = "data: \"this is a string\" more: \"this is another\""; > s/(\w+)\s/$1 /g; > print "$_\n"; > > It prints: > > data: "this is a string" more: "this is another" >

Re: \1 in character class?

2010-07-14 Thread Chris Charley
- Original Message - From: "Bryan R Harris" Subject: \1 in character class? I'm trying to temporarily deal with simple quoted strings by turning: data: "this is a string" more: "this is another" into... data: "this is a string" more: "this is another" TIA. - Bryan Here

Re: \1 in character class?

2010-07-13 Thread Chas. Owens
On Jul 13, 2010, at 11:32, Erez Schatz wrote: > On 13 July 2010 18:16, Shawn H Corey wrote: > >> Because [] define a character set; everything inside it is a character. >> That means it does not expand \1. > > That's not entirely correct. Character classes recognize variables, > escaped ch

Re: \1 in character class?

2010-07-13 Thread Erez Schatz
On 13 July 2010 18:16, Shawn H Corey wrote: > Because [] define a character set;  everything inside it is a character. >  That means it does not expand \1. That's not entirely correct. Character classes recognize variables, escaped characters and some other regexp notation, but not \1 back-refer

Re: \1 in character class?

2010-07-13 Thread Chas. Owens
On Tue, Jul 13, 2010 at 06:00, Bryan R Harris wrote: > > > I'm trying to temporarily deal with simple quoted strings by turning: > >  data: "this is a string" more: "this is another" > > into... > >  data: "this is a string" more: "this is another" > > I thought this would work: > >  s/(['"])([^\1

Re: \1 in character class?

2010-07-13 Thread Erez Schatz
On 13 July 2010 13:00, Bryan R Harris wrote: > > I thought this would work: > >  s/(['"])([^\1]*)\1/${1}.despace($2).$1/gse; > > ... but it doesn't.  It looks like the [^\1]* in the regexp isn't working > right. Character classes (characters inside square brackets - []) in regexp notation, inter

Re: \1 in character class?

2010-07-13 Thread Shawn H Corey
On 10-07-13 06:00 AM, Bryan R Harris wrote: I'm trying to temporarily deal with simple quoted strings by turning: data: "this is a string" more: "this is another" into... data: "this is a string" more: "this is another" I thought this would work: s/(['"])([^\1]*)\1/${1}.despace($2

Re: \1 in character class?

2010-07-13 Thread Jennifer Jones Harrington
How about... #!/usr/bin/perl use warnings; $_ = "data: \"this is a string\" more: \"this is another\""; s/(\w+)\s/$1 /g; print "$_\n"; It prints: data: "this is a string" more: "this is another" On Tue, Jul 13, 2010 at 6:00 AM, Bryan R Harris wrote: > > > I'm trying to temporarily deal with

Re: 1-line datafile, need data for another routine

2010-02-06 Thread Jim Gibson
At 5:48 AM -0500 2/6/10, Chris Coggins wrote: 1. another script uses data passed into it from an html form. Some of the fields are empty, and my "print report file" subroutine prints the empty variables because I don't know how to filter them out, and they need to be removed from the report. C

Re: 1-line datafile, need data for another routine

2010-02-06 Thread 7
On 2/6/10, Chris Coggins wrote: > Rob Dixon wrote: >> Chris Coggins wrote: >>> I posted a question to this list yesterday from the google groups >>> interface, asking for help with the following. I have since tried to >>> post additional details in replies to that message using the google >>> grou

Re: 1-line text file with numbers, need to add to them

2010-02-06 Thread 7
On 2/4/10, Chris wrote: > On Feb 4, 10:59 am, shlo...@iglu.org.il (Shlomi Fish) wrote: >> Hi Chris! >> >> Have you visitedhttp://perl-begin.org/yet and read a good introductory >> book >> or tutorial? >> >> On Thursday 04 Feb 2010 09:27:32 Chris wrote: >> >> > I need some help with this problem. >

Re: 1-line datafile, need data for another routine

2010-02-06 Thread Chris Coggins
Rob Dixon wrote: Chris Coggins wrote: I posted a question to this list yesterday from the google groups interface, asking for help with the following. I have since tried to post additional details in replies to that message using the google groups site and none of my posts have shown up on the

Re: 1-line text file with numbers, need to add to them

2010-02-05 Thread Uri Guttman
> "cc" == chaccou...@camcontacts com writes: cc> Please unsubscribe from chaccou...@camcontacts.com and h...@camcontacts.com i don't manage this list. you can follow the directions for subscribing which are in the headers of each email on the list. uri -- Uri Guttman -- u...@stem

Re: 1-line text file with numbers, need to add to them

2010-02-05 Thread Uri Guttman
> "F" == Frank writes: F> #!/usr/bin/perl F> open(DATA,"data.txt"); F> while() { F> $number=$_; F> # print $number; F> while ($number =~ /([0-9]+)~s/g){ F> printf ("%d\n","$1"); F> } F> } F> close(DATA); regardless of the poor code there and others have commen

Re: 1-line text file with numbers, need to add to them

2010-02-05 Thread John W. Krahn
Frank wrote: On Feb 4, 4:35 pm, jwkr...@shaw.ca ("John W. Krahn") wrote: Chris wrote: I need some help with this problem. I've got a text file datafile with 1 line of data comprised of 30 different numbers delimited with ~s. I need to open this file, grab this line of data, split it into indivi

Re: 1-line text file with numbers, need to add to them

2010-02-05 Thread Frank
On Feb 4, 4:35 pm, jwkr...@shaw.ca ("John W. Krahn") wrote: > Chris wrote: > > I need some help with this problem. > > I've got a text file datafile with 1 line of data comprised of 30 > > different numbers delimited with ~s. > > > I need to open this file, grab this line of data, split it into > >

Re: 1-line text file with numbers, need to add to them

2010-02-05 Thread Chris
On Feb 4, 2:27 am, cacogg...@gmail.com (Chris) wrote: > I need some help with this problem. > I've got a text file datafile with 1 line of data comprised of 30 > different numbers delimited with ~s. > > I need to open this file, grab this line of data, split it into > individual numbers, perform so

Re: 1-line text file with numbers, need to add to them

2010-02-05 Thread FrankCai
For instance, here is your data file. data.txt 12~s1~s314~s5677~s899~s0~s Then, here is the code. #!/usr/bin/perl open(DATA,"data.txt"); while() { $number=$_; # print $number; while ($number =~ /([0-9]+)~s/g){ printf ("%d\n","$1"); } } close(DATA); On Feb 4, 7:27 am, cacogg...@gmai

Re: 1-line datafile, need data for another routine

2010-02-05 Thread Shlomi Fish
Hi Chris! On Friday 05 Feb 2010 11:56:49 Chris Coggins wrote: > I posted a question to this list yesterday from the google groups > interface, asking for help with the following. I have since tried to > post additional details in replies to that message using the google > groups site and none of m

Re: 1-line datafile, need data for another routine

2010-02-05 Thread Rob Dixon
Chris Coggins wrote: I posted a question to this list yesterday from the google groups interface, asking for help with the following. I have since tried to post additional details in replies to that message using the google groups site and none of my posts have shown up on the list so let's try

Re: 1-line text file with numbers, need to add to them

2010-02-05 Thread Shlomi Fish
Hi Frank! On Thursday 04 Feb 2010 19:24:41 Frank wrote: > For instance, the below is your data file --data.txt > 12~s1~s314~s5677~s899~s0~s > Here are the codes: > > #!/usr/bin/perl > open(DATA,"data.txt"); > while() { > $number=$_; > # print $number; > while ($number =~ /([0-9]+)~s/g){ >

Re: 1-line text file with numbers, need to add to them

2010-02-05 Thread Frank
For instance, the below is your data file --data.txt 12~s1~s314~s5677~s899~s0~s Here are the codes: #!/usr/bin/perl open(DATA,"data.txt"); while() { $number=$_; # print $number; while ($number =~ /([0-9]+)~s/g){ printf ("%d\n","$1"); } } close(DATA); On Feb 4, 7:27 am, cacogg...@gmail

Re: 1-line text file with numbers, need to add to them

2010-02-05 Thread Chris
On Feb 4, 10:59 am, shlo...@iglu.org.il (Shlomi Fish) wrote: > Hi Chris! > > Have you visitedhttp://perl-begin.org/yet and read a good introductory book > or tutorial? > > On Thursday 04 Feb 2010 09:27:32 Chris wrote: > > > I need some help with this problem. > > I've got a text file datafile with

Re: 1-line datafile, need data for another routine

2010-02-05 Thread Chris Coggins
I posted a question to this list yesterday from the google groups interface, asking for help with the following. I have since tried to post additional details in replies to that message using the google groups site and none of my posts have shown up on the list so let's try this again the right

Re: 1-line text file with numbers, need to add to them

2010-02-04 Thread John W. Krahn
Chris wrote: I need some help with this problem. I've got a text file datafile with 1 line of data comprised of 30 different numbers delimited with ~s. I need to open this file, grab this line of data, split it into individual numbers, perform some simple math (addition) on each number, and then

Re: 1-line text file with numbers, need to add to them

2010-02-04 Thread Shlomi Fish
Hi Chris! Have you visited http://perl-begin.org/ yet and read a good introductory book or tutorial? On Thursday 04 Feb 2010 09:27:32 Chris wrote: > I need some help with this problem. > I've got a text file datafile with 1 line of data comprised of 30 > different numbers delimited with ~s. > >

Re: "$| = 1" ???

2009-09-11 Thread Philip Potter
2009/9/11 Raymond Wan : > Perldoc is somewhat hard to get into...but it's the manual for a programming >  language, so that's expected; I don't think having pages to color and draw > on would be a feasible idea for the next update.  :-) I don't think you should tar every perldoc page with the same

Re: "$| = 1" ???

2009-09-10 Thread Chas. Owens
On Thu, Sep 10, 2009 at 20:55, Raymond Wan wrote: snip > Perldoc is somewhat hard to get into...but it's the manual for a programming >  language, so that's expected; I don't think having pages to color and draw > on would be a feasible idea for the next update.  :-) snip Oh, I don't know, perlco

Re: "$| = 1" ???

2009-09-10 Thread Raymond Wan
Shawn H Corey wrote: Uri Guttman wrote: newbies will never learn it unless coerced into doing so. I disagree. If they don't have the curiosity to read all they can, then perhaps a future in computer programming is not an ideal career path for them. That's somewhat of a harsh statement..

Re: "$| = 1" ???

2009-09-10 Thread Uri Guttman
> "SHC" == Shawn H Corey writes: SHC> Uri Guttman wrote: >> newbies will never learn it unless coerced into >> doing so. SHC> I disagree. If they don't have the curiosity to read all they can, SHC> then perhaps a future in computer programming is not an ideal career SHC> path fo

Re: "$| = 1" ???

2009-09-10 Thread Shawn H Corey
Uri Guttman wrote: newbies will never learn it unless coerced into doing so. I disagree. If they don't have the curiosity to read all they can, then perhaps a future in computer programming is not an ideal career path for them. Some problems facing newbies: * They may not know perldoc eve

Re: "$| = 1" ???

2009-09-10 Thread Chas. Owens
On Thu, Sep 10, 2009 at 13:12, Bryan R Harris wrote: snip > My point is that-that's not obvious.  Why would anyone perldoc perl?  Isn't > perldoc already about perl?  Granted, just typing perldoc gets you started, > but it's at least 3 steps before you start getting close to your answer > (1-perld

Re: "$| = 1" ???

2009-09-10 Thread Bryan R Harris
>> "BRH" == Bryan R Harris writes: > > BRH> Curiously the most helpful people on this list seem to think the > BRH> perldoc system is great, but I've always found it to be rather > BRH> hard to use. If I need to figure out what "$." means, how do I > BRH> even start? I can't type

Re: "$| = 1" ???

2009-09-10 Thread Uri Guttman
> "BRH" == Bryan R Harris writes: BRH> Curiously the most helpful people on this list seem to think the BRH> perldoc system is great, but I've always found it to be rather BRH> hard to use. If I need to figure out what "$." means, how do I BRH> even start? I can't type "perldoc '$.'

Re: "$| = 1" ???

2009-09-10 Thread Gabor Szabo
On Thu, Sep 10, 2009 at 5:26 PM, Bryan R Harris wrote: > >>> "ES" == Erez Schatz writes: >> $| is a special variable. All perl special variables are listed in perldoc perlvar. See that document for a full explanation. >> >>   ES> This isn't really helping, sorry. >> >> sorry, but po

Re: "$| = 1" ???

2009-09-10 Thread Chas. Owens
On Thu, Sep 10, 2009 at 10:26, Bryan R Harris wrote: > >>> "ES" == Erez Schatz writes: >> $| is a special variable. All perl special variables are listed in perldoc perlvar. See that document for a full explanation. >> >>   ES> This isn't really helping, sorry. >> >> sorry, but poin

Re: "$| = 1" ???

2009-09-10 Thread Shawn H Corey
Bryan R Harris wrote: Curiously the most helpful people on this list seem to think the perldoc system is great, but I've always found it to be rather hard to use. Compared to most language documentation, perldoc is great; it's just not perfect. My pet peeve is the `perldoc -q` only searches

Re: "$| = 1" ???

2009-09-10 Thread Bryan R Harris
>> "ES" == Erez Schatz writes: > >>> $| is a special variable. All perl special variables are listed in >>> perldoc perlvar. See that document for a full explanation. > > ES> This isn't really helping, sorry. > > sorry, but pointing someone to the docs is helping more than directly > ans

Re: "$| = 1" ???

2009-09-10 Thread Philip Potter
2009/9/10 Erez Schatz : > 2009/9/10 Philip Potter : >> 2009/9/10 Tariq Doukkali : >>> Hi, >>> >>> i can not understand, what does this code: >>> >>> >>> $| = 1; > > This means the programmer wishes that the buffer will be flushed after > every write, or print. > Normally (i.e. $| = 0), the computer

Re: "$| = 1" ???

2009-09-10 Thread Uri Guttman
> "ES" == Erez Schatz writes: >> $| is a special variable. All perl special variables are listed in >> perldoc perlvar. See that document for a full explanation. ES> This isn't really helping, sorry. sorry, but pointing someone to the docs is helping more than directly answering the q

Re: "$| = 1" ???

2009-09-10 Thread Erez Schatz
2009/9/10 Philip Potter : > 2009/9/10 Tariq Doukkali : >> Hi, >> >> i can not understand, what does this code: >> >> >> $| = 1; This means the programmer wishes that the buffer will be flushed after every write, or print. Normally (i.e. $| = 0), the computer stores output in a buffer, which is pro

Re: "$| = 1" ???

2009-09-10 Thread Shlomi Fish
On Thursday 10 September 2009 11:17:33 Tariq Doukkali wrote: > Hi, > > i can not understand, what does this code: > > > $| = 1; > $| is a special variable. Reading its description from perldoc perlvar: < $| If set to nonzero, forces a flush right away and after every

Re: "$| = 1" ???

2009-09-10 Thread Uri Guttman
> "TD" == Tariq Doukkali writes: TD> Hi, TD> i can not understand, what does this code: TD> $| = 1; all of perl's special variables are documented in perldoc perlvar. read that first and see if you learn what $| does. if you still don't get it, then ask here for clarification. uri

Re: "$| = 1" ???

2009-09-10 Thread Philip Potter
2009/9/10 Tariq Doukkali : > Hi, > > i can not understand, what does this code: > > > $| = 1; $| is a special variable. All perl special variables are listed in perldoc perlvar. See that document for a full explanation. Phil -- "I have always wished for my computer to be as easy to use as my te

Re: $1 $2 var confusion

2007-05-12 Thread Mumia W.
On 05/12/2007 07:00 PM, Rob Dixon wrote: [...] No, it has no effect on $1. I thought it would cause confusion! The statement simply assigns a list to @f. The first element of the list is undef, and the rest is the result of applying the regex to $email, so it's the same as my @f = (undef);

Re: $1 $2 var confusion

2007-05-12 Thread Rob Dixon
Steve Bertrand wrote: John W. Krahn wrote: Mumia W. wrote: That happens because the match variables ($1, $2, ...) are only changed when a regular expression matches; otherwise, they are left alone. In the first case, "$2 !~ /domain\.com/" succeeds but does not capture anything, so the numbered

Re: $1 $2 var confusion

2007-05-12 Thread Steve Bertrand
John W. Krahn wrote: > Mumia W. wrote: >> That happens because the match variables ($1, $2, ...) are only changed >> when a regular expression matches; otherwise, they are left alone. >> >> In the first case, "$2 !~ /domain\.com/" succeeds but does not capture >> anything, so the numbered match var

Re: $1 $2 var confusion

2007-05-12 Thread Rob Dixon
John W. Krahn wrote: Mumia W. wrote: That happens because the match variables ($1, $2, ...) are only changed when a regular expression matches; otherwise, they are left alone. In the first case, "$2 !~ /domain\.com/" succeeds but does not capture anything, so the numbered match variables are un

Re: $1 $2 var confusion

2007-05-12 Thread John W. Krahn
Mumia W. wrote: > > That happens because the match variables ($1, $2, ...) are only changed > when a regular expression matches; otherwise, they are left alone. > > In the first case, "$2 !~ /domain\.com/" succeeds but does not capture > anything, so the numbered match variables are unset. > > Y

Re: $1 $2 var confusion

2007-05-12 Thread Steve Bertrand
> That happens because the match variables ($1, $2, ...) are only changed > when a regular expression matches; otherwise, they are left alone. > > In the first case, "$2 !~ /domain\.com/" succeeds but does not capture > anything, so the numbered match variables are unset. > > Your situation reinf

Re: $1 $2 var confusion

2007-05-12 Thread Steve Bertrand
> But are you really trying to do something like validate an email > address? They're more complex than you may realize. (For example, > there may be more than one '@' sign in an e-mail address.) Maybe > there's a module on CPAN that could help you with whatever you're > doing. Thanks for your inp

Re: $1 $2 var confusion

2007-05-12 Thread Steve Bertrand
> From perldoc perlre: > >The numbered match variables ($1, $2, $3, etc.) and the related >punctuation set ($+, $&, $`, $', and $^N) are all dynamically scoped >until the end of the enclosing block or until the next successful match, >whichever comes first. > > In your first examp

Re: $1 $2 var confusion

2007-05-12 Thread Mumia W.
On 05/12/2007 09:21 AM, Steve Bertrand wrote: I have two scenarios here, and in the first one, I am not seeing the logic I would normally expect. I'll compact the code as to save everyone from scrolling. I have strict and warnings enabled (as I always do). Can someone tell me why in the first c

Re: $1 $2 var confusion

2007-05-12 Thread Tom Phoenix
On 5/12/07, Steve Bertrand <[EMAIL PROTECTED]> wrote: my $email = '[EMAIL PROTECTED]'; $email =~ /(.*)@(.*)/; if ($2 !~ /domain\.com/) { print "var 2 is bad\n"; } print "$1\n"; At this point, what is $1? It's the value from the last successful pattern match. But was that the test again

Re: $1 $2 var confusion

2007-05-12 Thread Rob Dixon
Steve Bertrand wrote: I have two scenarios here, and in the first one, I am not seeing the logic I would normally expect. I'll compact the code as to save everyone from scrolling. I have strict and warnings enabled (as I always do). Can someone tell me why in the first case $1 isn't initialized a

RE: 1, random; 2, unicode

2006-12-27 Thread zhao_bingfeng
> -Original Message- > From: Adriano Allora [mailto:[EMAIL PROTECTED] > Sent: Thursday, December 28, 2006 3:24 AM > To: beginners@perl.org > Subject: 1, random; 2, unicode > > hi to all, > > two questions: > > 1) I need to extract a random item from an hash, does exist a > function > to do

RE: 1 at end of script

2005-04-05 Thread Peter Scott
On Sun, 03 Apr 2005 14:45:55 -0500, Dave Kettmann wrote: > Nevermind I *just* figured it out. It is the exit code. Oops :) It just occurred to me that perhaps by 'exit code' you meant 'return value of the subroutine' instead of what 'exit code' normally means, the exit code of the script, in which

RE: 1 at end of script

2005-04-05 Thread Peter Scott
On Sun, 03 Apr 2005 14:45:55 -0500, Dave Kettmann wrote: > Nevermind I *just* figured it out. It is the exit code. Oops :) No it isn't. It is the result of printing the return value of a subroutine whose last expression evaluated is a print() statement. >> $action = param('action'); >> if (

RE: 1 at end of script

2005-04-03 Thread Dave Kettmann
Nevermind I *just* figured it out. It is the exit code. Oops :) Dave > -Original Message- > From: Dave Kettmann > Sent: Sunday, April 03, 2005 2:45 PM > To: Perl List (E-mail) > Subject: 1 at end of script > > > Hello all, > > This is a CGI question, and I know there is a CGI list for

RE: 1 Windows XP + 1 Office XP = $80 d dhhytzy vs dxq

2004-07-17 Thread Tim Johnson
I guess his name says it all... -Original Message- From: Carl Colon [mailto:[EMAIL PROTECTED] Sent: Wed 7/21/2004 1:16 PM To: [EMAIL PROTECTED] Cc: Subject: 1 Windows XP + 1 Office XP = $80 d dhhytzy vs dxq Loa

Re: 1 liner question

2004-02-25 Thread John W. Krahn
Chad Kellerman wrote: > > Hello everyone... Hello, > I am working on a perl one liner for adding quota on multiple > partitions. But I can not, for the life of me get the number to add > up.. > > Here is what I have: > > /usr/bin/quota michele | perl -ne 'if(/none$/){print > "

Re: 1 liner question

2004-02-25 Thread WC -Sx- Jones
chad kellerman wrote: Sx, /usr/bin/quota michele | perl -ne 'if(/none$/){print "9\n"}elsif(m:^\s+/dev/:){($q, $l)=(split(/\s+/))[2,3];$t=($l-$q)*1024};next if(!$t);{print $t."\n"}' Is none a reserved word now? I ask because quota doesnt return the same values across Unix opsys... Otherwi

Re: 1 liner question

2004-02-25 Thread chad kellerman
Sx, This script goes into a procmail recipe I was working on. It's running on linux. If you run quota for a user and the quota is not set it returns actually returns none and I just print the 9's to signify that. If the user has quota on multiple partitions, the quota command prints the qu

Re: 1 liner question

2004-02-25 Thread WC -Sx- Jones
chad kellerman wrote: /usr/bin/quota michele | perl -ne 'if(/none$/){print "9\n"}elsif(m:^\s+/dev/:){($q, $l)=(split(/\s+/))[2,3];$t=($l-$q)*1024};next if(!$t);{print $t."\n"}' Is none a reserved word now? I ask because quota doesnt return the same values across Unix opsys... Otherwise i

RE: 1 liner question

2004-02-25 Thread Tim Johnson
That's not really a one-liner, that's just a script with the whitespace taken out. Just my opinion, but I thought the whole point to one-liners was to try to reduce a complex operation to its most compact form so that you could just type it at the command-line when you needed it quickly. If you

Re: 1 doubt.

2003-12-11 Thread Yannick Warnier
Le jeu 11/12/2003 à 10:27, Ajey Kulkarni a écrit : > perl t.pl > Name "main::FH" used only once: possible typo at t.pl line 6. > > cat t.pl > > #!/usr/bin/perl > > use strict; > use warnings; > > open FH, "out.dat"; > > > Why am i getting this warning? When i remove the warnings,this goes off

Re: 1 doubt.

2003-12-10 Thread R. Joseph Newton
Ajey Kulkarni wrote: > perl t.pl > Name "main::FH" used only once: possible typo at t.pl line 6. > > cat t.pl > > #!/usr/bin/perl > > use strict; > use warnings; > > open FH, "out.dat"; > > Why am i getting this warning? Because the compiler thinks that you are probably doing something pointless.

RE: 1 doubt.

2003-12-10 Thread Ned Cunningham
It's a warning. If you turn it off you wont get it :) Ned Cunningham POS Systems Development Monro Muffler Brake 200 Holleder Parkway Rochester, NY 14615 (585) 647-6400 ext. 310 [EMAIL PROTECTED] -Original Message- From: Ajey Kulkarni [mailto:[EMAIL PR

Re: 1 doubt.

2003-12-10 Thread perl-beginners
On Thu, Dec 11, 2003 at 09:27:48AM +, Ajey Kulkarni wrote: > perl t.pl > Name "main::FH" used only once: possible typo at t.pl line 6. You opened a file, but you do not read from the file. Just opened it. This doesn't make much sense. So you get a warning. > cat t.pl > > #!/usr/bin/perl > >

Re: 1 doubt.

2003-12-10 Thread James Edward Gray II
On Dec 11, 2003, at 3:27 AM, Ajey Kulkarni wrote: perl t.pl Name "main::FH" used only once: possible typo at t.pl line 6. cat t.pl #!/usr/bin/perl use strict; use warnings; open FH, "out.dat"; Why am i getting this warning? When i remove the warnings,this goes off? Is there any problem if i no

RE: 1 doubt.

2003-12-10 Thread Stephen Hardisty
> Name "main::FH" used only once: possible typo at t.pl line 6. It's because it's used only once ;o) . If you just declare something (variable, filehandle etc.) but don't use it, something's probably wrong with your code (such as a typo). If you try reading or writing using that filehandle the e

Re: 1) Automated FTP 2) txt to html 3) pstools vs WMI

2003-03-25 Thread Jenda Krynicky
From: "Pradeep Goel" <[EMAIL PROTECTED]> > > Why don't you generate it in HTML then??? > > I don't have a good idea about that - can you give some pointers for > this ? HTML is just text with some markup inside. You can easily generate it by print statements like print <<"*END*";

Re: 1) Automated FTP 2) txt to html 3) pstools vs WMI

2003-03-24 Thread Pradeep Goel
- Original Message - From: "Jenda Krynicky" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, March 25, 2003 12:35 AM Subject: Re: 1) Automated FTP 2) txt to html 3) pstools vs WMI > From: "Pradeep Goel" <[EMAIL PROTECTED]> >

Re: 1) Automated FTP 2) txt to html 3) pstools vs WMI

2003-03-24 Thread R. Joseph Newton
Pradeep Goel wrote: > 2) > Also if somebody what I can do to make a page html instead of txt or doc - keeping > up the format ( need not be exact format but it should not just be a messed up one). > when i rename from .doc to .html or use copy command ( i.e. on windows machine) the > format goes

Re: 1) Automated FTP 2) txt to html 3) pstools vs WMI

2003-03-24 Thread Jenda Krynicky
From: "Pradeep Goel" <[EMAIL PROTECTED]> > From: "Janek Schleicher" <[EMAIL PROTECTED]> > > Pradeep Goel wrote at Mon, 24 Mar 2003 11:24:15 +0530: > > > > > Hi All ,pls answer if u know anything out of 3 different > > > questions. > > > > If you have 3 different questions, > > ask in 3 different ar

Re: 1) Automated FTP 2) txt to html 3) pstools vs WMI

2003-03-24 Thread Pradeep Goel
Hi Rob Thanks a lot . You & the "remote partner " seems to be the two extremes . A really impressive mail with lot of positive attitude . Can you tell something more about LWP use for my solution i.e. how to transer a doc/html file automatically on daily basis from my windows machine to a uni

Re: 1) Automated FTP 2) txt to html 3) pstools vs WMI

2003-03-24 Thread Rob Dixon
"Pradeep Goel" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > - Original Message - > From: "Janek Schleicher" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Monday, March 24, 2003 2:57 PM > Subjec

Re: 1) Automated FTP 2) txt to html 3) pstools vs WMI

2003-03-24 Thread Rob Dixon
Pradeep Goel wrote: > Hi All ,pls answer if u know anything out of 3 different questions. Hello Pradeep. Welcome to perl.beginners. A lot of us here know a lot about Perl, and between us we can help you with almost any Perl problem that a Perl beginner might come across. > 1) > Can somebody give

Re: 1) Automated FTP 2) txt to html 3) pstools vs WMI

2003-03-24 Thread Pradeep Goel
- Original Message - From: "Janek Schleicher" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, March 24, 2003 2:57 PM Subject: Re: 1) Automated FTP 2) txt to html 3) pstools vs WMI > Pradeep Goel wrote at Mon, 24 Mar 2003 11:24:15 +0530: > >

Re: 1) Automated FTP 2) txt to html 3) pstools vs WMI

2003-03-24 Thread Janek Schleicher
Pradeep Goel wrote at Mon, 24 Mar 2003 11:24:15 +0530: > Hi All ,pls answer if u know anything out of 3 different questions. If you have 3 different questions, ask in 3 different articles, not in one ! > 1) > Can somebody give some pointers where to look for or any particularly > good one ( free

Re: 1) Automated FTP 2) txt to html 3) pstools vs WMI

2003-03-23 Thread Sudarshan Raghavan
On Mon, 24 Mar 2003, Pradeep Goel wrote: > Hi All ,pls answer if u know anything out of 3 different questions. > > 1) > Can somebody give some pointers where to look for or any particularly good one ( > free ofcourse) automated ftp tool which can be used for transfering a txt/doc file > from my

Re: \1 vs $1 (was: Re: pass cmdline var to this syntax s/$var/$revar/)

2003-02-20 Thread Tom Greer
Doesn't say it's deprecated, though. Still, is there ever a time $1 won't work? I stumbled on this example at http://tutorials.findtutorials.com/read/category/80/id/99/p/ (bottom of the page)... Finally, in our tour of regular expressions, let's look again at backreferences. Suppose you want

Re: \1 vs $1 (was: Re: pass cmdline var to this syntax s/$var/$revar/)

2003-02-20 Thread david
Paul wrote: > > *THAT's* that example I was trying to remember a while ago! > This is true; I used a bogus test before posting that answer, which I > won't show because it was wrong anyway, lol > not a big deal. we all make mistake. david -- To unsubscribe, e-mail: [EMAIL PROTECTED] For a

Re: \1 vs $1 (was: Re: pass cmdline var to this syntax s/$var/$revar/)

2003-02-20 Thread Paul
--- david <[EMAIL PROTECTED]> wrote: > Paul wrote: > > m/^(\d+)abcd$1$/; # :) > and you just get yourself a bug. $1 is not populated after the > search. $1 always holds undef. *THAT's* that example I was trying to remember a while ago! This is true; I used a bogus test before posting that answer

Re: \1 vs $1 (was: Re: pass cmdline var to this syntax s/$var/$revar/)

2003-02-20 Thread david
Paul wrote: >> >> there are lots of ways but how can you beat :-) >> >> s/^(\d+)abcd\1$/; > > m/^(\d+)abcd$1$/; # :) > and you just get yourself a bug. $1 is not populated after the search. $1 always holds undef. david -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands,

Re: \1 vs $1 (was: Re: pass cmdline var to this syntax s/$var/$revar/)

2003-02-20 Thread Paul
--- david <[EMAIL PROTECTED]> wrote: > > Doesn't say it's deprecated, though. > > Still, is there ever a time $1 won't work? > > not sure. probably no. what i am thinking is how would you write a > reg that reads: > > "start with a bunch of number, following by the string 'abcd', > following by

Re: \1 vs $1 (was: Re: pass cmdline var to this syntax s/$var/$revar/)

2003-02-20 Thread david
David wrote: > s/^(\d+)abcd\1$/; sorry, that should be: /^(\d+)abcd\1$/; david -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: \1 vs $1 (was: Re: pass cmdline var to this syntax s/$var/$revar/)

2003-02-20 Thread david
Paul wrote: > Doesn't say it's deprecated, though. > Still, is there ever a time $1 won't work? not sure. probably no. what i am thinking is how would you write a reg that reads: "start with a bunch of number, following by the string 'abcd', following by whatever the number that you are start

RE: 1) cygwin , 2) sprite/DBM

2003-02-17 Thread Dan Muey
03 11:56 AM > To: 'Chris Jones'; 'Pradeep Goel'; > [EMAIL PROTECTED] > Cc: [EMAIL PROTECTED] > Subject: RE: 1) cygwin , 2) sprite/DBM > > > Does anyone know of a good resource that compares MySQL for > windows to the other popular engines? > >

RE: 1) cygwin , 2) sprite/DBM

2003-02-17 Thread Dan Morrison
PROTECTED] Subject: Re: 1) cygwin , 2) sprite/DBM If the programs you are using are perl scripts then it is likely that you can run them directly on Windows without CYGWIN. Depending on the size of the database file and how you want to use it, you might consider MySQL - open source, fast database

Re: 1) cygwin , 2) sprite/DBM

2003-02-17 Thread Chris Jones
If the programs you are using are perl scripts then it is likely that you can run them directly on Windows without CYGWIN. Depending on the size of the database file and how you want to use it, you might consider MySQL - open source, fast database. Hi All I have no idea of CYGWIN except o

Re: 1) cygwin , 2) sprite/DBM

2003-02-17 Thread Paul
--- Pradeep Goel <[EMAIL PROTECTED]> wrote: > Hi All > I have no idea of CYGWIN except only that almost all unix commands > can be run on windows . > I want to know if the SAME program running on unix systems can be run > on windows without any change ( or otherwise what changes need to be > ma

RE: 1) cygwin , 2) sprite/DBM

2003-02-17 Thread Tillman, James
x27;; [EMAIL PROTECTED] > Cc: [EMAIL PROTECTED] > Subject: RE: 1) cygwin , 2) sprite/DBM > > > > -Original Message- > > From: Pradeep Goel [mailto:[EMAIL PROTECTED]] > > Sent: Monday, February 17, 2003 8:34 AM > > To: [EMAIL PROTECTED] > &

RE: 1) cygwin , 2) sprite/DBM

2003-02-17 Thread Tillman, James
> -Original Message- > From: Pradeep Goel [mailto:[EMAIL PROTECTED]] > Sent: Monday, February 17, 2003 8:34 AM > To: [EMAIL PROTECTED] > Cc: [EMAIL PROTECTED] > Subject: 1) cygwin , 2) sprite/DBM > > > Hi All > > I have no idea of CYGWIN except only that almost all unix > commands c

Re: 1) cygwin , 2) sprite/DBM

2003-02-17 Thread Jenda Krynicky
From: "Pradeep Goel" <[EMAIL PROTECTED]> > I have no idea of CYGWIN except only that almost all unix commands > can be run on windows . > > I want to know if the SAME program running on unix systems can be run > on windows without any change ( or otherwise what changes need to be > made) after

Re: "1;"?

2003-01-24 Thread Rob Dixon
R. Joseph Newton wrote: > Rob Richardson wrote: > >> Greetings! >> >> Dan Muey's stumpy.lib file, quoted below, ends with a statement >> consisting of a single contstant value: "1;". This is the second >> time >> I've seen this today. What is its purpose? > > It's pretty much a standard for modul

  1   2   >