RE: problem with nested regex matchs

2012-03-08 Thread Kronheim, David (Contr)
Chris Stinemetz [chrisstinem...@gmail.com] wrote: >Hello Shanmugam, > >Please start a new thread when you post a new topic. > > >On Wed, Mar 7, 2012 at 5:14 PM, shanmugam m wrote: >> Hi, >> This is my first perl program..I'm getting wired errors.Please take a >> look. >> >> This line looks inco

RE: problem with nested regex matchs

2012-03-08 Thread Ken Slater
> -Original Message- > From: Chris Stinemetz [mailto:chrisstinem...@gmail.com] > Sent: Wednesday, March 07, 2012 8:57 PM > To: John W. Krahn; beginners@perl.org > Subject: Re: problem with nested regex matchs > > >> > >>> > >>> open(MYI

Re: problem with nested regex matchs

2012-03-07 Thread Chris Stinemetz
>> >>> >>> open(MYINPUTFILE ,"/net/fallsroot/export/d100/m4/input_file"); >>> open(MYOUTFILE, ">  output_file"); >> >> >> it is recommended to use a three argument filehandle > > > "three argument filehandle"? What I meant to imply was: "3-argument version of open" > > >> open my $INPUTFILE, '<',

Re: problem with nested regex matchs

2012-03-07 Thread Shawn H Corey
On 12-03-07 06:40 PM, Chris Stinemetz wrote: On Wed, Mar 7, 2012 at 5:14 PM, shanmugam m wrote: my @column1 = split("/\\/",$line); I'm not sure what you are trying to do here. Split will split on white space by default I think he's trying to split on a backslash. Try: my @column1 =

Re: problem with nested regex matchs

2012-03-07 Thread John W. Krahn
Chris Stinemetz wrote: Hello Shanmugam, Please start a new thread when you post a new topic. On Wed, Mar 7, 2012 at 5:14 PM, shanmugam m wrote: Hi, This is my first perl program..I'm getting wired errors.Please take a look. #!persist/pkg/bin/perl use diagnostics; use warnings; always u

Re: problem with nested regex matchs

2012-03-07 Thread John W. Krahn
Subject: Re: problem with nested regex matchs What does this post have to do with "nested regex matchs"? shanmugam m wrote: Hi, This is my first perl program..I'm getting wired errors.Please take a look. What errors are you getting? #!persist/pkg/bin/perl use d

Re: problem with nested regex matchs

2012-03-07 Thread Chris Stinemetz
correction > while ( my $line = $INPUTFILE ) { should be: while ( my $line = <$INPUTFILE> ) { -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: problem with nested regex matchs

2012-03-07 Thread Chris Stinemetz
Hello Shanmugam, Please start a new thread when you post a new topic. On Wed, Mar 7, 2012 at 5:14 PM, shanmugam m wrote: > Hi, >  This is my first perl program..I'm getting wired errors.Please take a > look. > > > #!persist/pkg/bin/perl > use diagnostics; > use warnings; always use the strict

Re: problem with nested regex matchs

2012-03-07 Thread shanmugam m
Hi, This is my first perl program..I'm getting wired errors.Please take a look. #!persist/pkg/bin/perl use diagnostics; use warnings; open(MYINPUTFILE ,"/net/fallsroot/export/d100/m4/input_file"); open(MYOUTFILE, "> output_file"); foreach $line (){ chomp($line);# remo

Re: problem with nested regex matchs

2012-03-07 Thread Rob Dixon
On 07/03/2012 16:18, mailing lists wrote: Hello, is there any way to extract the queued ID (7BC5A446) from the first line and also match the second with only one regex?? #!/usr/bin/perl use strict; use warnings; use 5.010; while(){ if (/^(?\S+?)\s+?(?\S+?)\s+?(?\S+?)\s+?(?\S+?)\s+?(?\S+