Bjørge Solli wrote:
> I have this as a part of my script:
> 
>     $ncfile = `ls -1 $mersea_cat | head -1`;
>     print $ncfile;
> 
> It prints the desired first file in $mersea_cat, but _before_ that the ls 
> command prints an errormessage to stderr:
> 
> ls: write error: Broken pipe

Why not just do it in Perl without shelling out to use ls and head:

my $ncfile = substr glob( "$mersea_cat/*" ), length( $mersea_cat ) + 1;



John
-- 
use Perl;
program
fulfillment

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to