目前遇狀況是要執行perl perl3.pl find_me文件中的字並print out
perl3.pl中內碼是
#!/user/bin/perl -w
use strict;
use warnings;
open( my $fh, '<', $filename ) or die "Can't open $filename: $!";
while ( my $line = <$fh> ) {
if ( $line =~ /wanted text/ ) {
print $line;
}
}
close $fh;
但一無法執行,想問哪裡改寫?