in reply to Re: Re: Re: Using UNIX commands inside Perl scripts, with Perl variables
in thread Using UNIX commands inside Perl scripts, with Perl variables
# $command can be any system command, that would produce an acceptable output my $string = "my email is"; my $dir = "/home/erik/*"; my $command = "grep -ri '".$string."' ".$dir; open(IN, $command." |"); my @IN = <IN>; close(IN);
Better, Stephen? =) I agree, that opening dirs isn't the best purpose for this method.
Erik
|
|---|