in reply to literal meaning of a variable
Can anyone suggest that what I should do here????
Well, yes.
If it was me - rather than calling the shell - I would open the file, and then search for the line/s of interest.
Something like (untested):
my $file = "$ENV{JBOSS_HOME}/log/wrapper.log"; open IN, "<$file" or die "Cannot open $file:$!\n"; while (<IN>) { chomp; next if ($_ !~ /$find/); next if ($_ !~ /$date/); push @array, $_; }
Cheers,
Darren :)
Update: Fixed code snippet, as per revdiablo below :)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: literal meaning of a variable
by revdiablo (Prior) on Feb 27, 2006 at 06:17 UTC | |
by McDarren (Abbot) on Feb 27, 2006 at 06:32 UTC |