[ABE.pm] backticking problem
Ricardo SIGNES
rjbs-perl-abe at lists.manxome.org
Wed Nov 30 11:01:11 PST 2005
* Faber Fedor <faber at linuxnj.com> [2005-11-30T11:58:51]
> which works correctly on the command line. When I put it in a PErl
> script thusly
>
> my $line = `lynx -dump $url | grep 'S&P 500' | head -5 | head -1`
>
> I get the output of the lynx command or the equivalent of
>
> my $line = `lynx -dump $url`
I'm with Walt: I don't see anything immediately wrong. Did you copy and
paste that code, or did you maybe insert an error (fixing the problem)
in your transcription?
alternately:
my ($line) = grep { /S&P/ } split /\n/, `lynx -dump $url`;
I've just eaten, so my brain may be slighly laggy, but that should do
what you want, too.
Could you show us the whole script your running -- or, much better, show
us a pared down version that can be run, producing the same problematic
results?
Are we going to see you at McGrady's tonight? :)
--
rjbs
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.pm.org/pipermail/abe-pm/attachments/20051130/c0c16a72/attachment.bin
More information about the ABE-pm
mailing list