On Mon, May 13, 2002 at 01:53:49PM -0700, daniel wrote:
> tried that
> but how then do i access the data being piped into perl?
>
> right now, this is all the perlscript says:
>
> #!/usr/bin/perl -w
>
> for (my $i = 0; $i <= scalar(@ARGV) - 1; $i++) {
> print "$ARGV[0]\n";
> }
This script is wrong. ARGV contains the arguments given to the perl
script. But when you use a pipe, the data is available to perl on STDIN,
the standard input, NOT as arguments.
try instead:
while (<STDIN>) {
print;
}
This will simply print the page as received. You can of course do anything
you like to it now.
--
Anand Buddhdev
Personal site: http://anand.org
_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list