Ankit Gupta; [EMAIL PROTECTED]
Subject: RE: Help in Regular expression with array
Beau..I guess , the evaluation of the expression is not going to be true if
no "Date:" is found. Since map returns a list consisting of the results of
each successive evaluation of the expression..., the map
etter idea!!
-Original Message-
From: Eric Beaudoin [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 05, 2002 4:29 PM
To: Shishir K. Singh
Cc: Ankit Gupta; [EMAIL PROTECTED]
Subject: RE: Help in Regular expression with array
At 16:12 2002.06.05, Shishir K. Singh wrote:
>open (FILE , "&
At 16:12 2002.06.05, Shishir K. Singh wrote:
>open (FILE , "<$ARGV[0]");
>print "ok" if ( map { /Date:/ } () );
>close FILE;
map return an array with the result of the express apply to each line. Even if none of
the lines in contain Date:, you will have an array with one "" value for each
li
ent
open (FILE , "<$ARGV[0]");
print "ok" if ( map { /Date:/ } () );
close FILE;
-Original Message-
From: Ankit Gupta [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 05, 2002 3:49 PM
To: [EMAIL PROTECTED]
Subject: Help in Regular expression with array
Message-
From: Ankit Gupta [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 05, 2002 9:49 AM
To: [EMAIL PROTECTED]
Subject: Help in Regular expression with array
Hello,
I am facing a problem in using regular expression on array. My code is
written below:
open(FILE, $dirvalue) ;
> -Original Message-
> From: Ankit Gupta [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, June 05, 2002 3:49 PM
> To: [EMAIL PROTECTED]
> Subject: Help in Regular expression with array
>
>
> Hello,
>
> I am facing a problem in using regular expression on arr
print "ok"
}
}
/\/\ark
-Original Message-
From: Ankit Gupta [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 05, 2002 12:49 PM
To: [EMAIL PROTECTED]
Subject: Help in Regular expression with array
Hello,
I am facing a problem in using regular expression on array.
At 15:49 2002.06.05, Ankit Gupta wrote:
>Hello,
>
>I am facing a problem in using regular expression on array. My code is
>written below:
>open(FILE, $dirvalue) ;
> my @lines = ;
> print @lines; # prints the file contents
> if( @lines =~ m/Date:/) { pri
Hello,
I am facing a problem in using regular expression on array. My code is
written below:
open(FILE, $dirvalue) ;
my @lines = ;
print @lines; # prints the file contents
if( @lines =~ m/Date:/) { print "ok";}
close(FILE);
here I can pr