$ perl extract.pl try.tex
Bareword "filename" not allowed while "strict subs" in use at extract.pl line 8.
Execution of extract.pl aborted due to compilation errors.


#!/usr/bin/env perl

use strict;
use warnings;

my $filename = $ARGV[0] ;

open FILE, "<", filename or die $!;

my @line = <FILE> ;

while (<FILE>) {
        print $_;
}


I tried mf $filename = <STDIN> also not work.

Thanks ahead for any suggestions,

Best regards,

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to