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

    Except !~ is a binary operator. Perhaps you meant:

    ... next if !/$find/; next if !/$date/; ...

    Though I would be tempted to instead use:

    ... next unless /$find/; next unless /$date/; ...
      Except !~ is a binary operator.

      heh... well, I did say it was untested :)
      What I meant was: next if ($_ !~ /$find/);
      Although I guess in that context it's essentially the same as: next if !/$find/; yes?

      Ever since I read TheDamian's PBP, I tend to try and avoid unless :)