#!usr/bin/perl use warnings; use strict; unless ( defined $ARGV[0] ) { die "Usage: contents4 \n"; } my @text; { local @ARGV = ( $ARGV[0] ); push @text, grep /important/, <>; } print @text, "\n"; print @ARGV, "\n";