in reply to Another system redirect problem
It looks like you want something like this (UNTESTED):
# use File::Find; # open LIST_FH, '>>', '/Volumes/Expansion Drive/stuffTGZ/list_xxx_dirs.t +xt' or die "Cannot open '/Volumes/Expansion Drive/stuffTGZ/list_xxx_d +irs.txt' because: $!"; find( sub { return unless /\.xxx$/; print "$File::Find::name\n"; print LIST_FH "-------------------------------------------------"; print LIST_FH "- $File::Find::name -----------------------------"; open LS_PIPE, '-|', '/bin/ls' ,'-l', $File::Find::name or die "Can +not open pipe from '/bin/ls' because: $!"; print LIST_FH <LS_PIPE>; close LS_PIPE or warn $! ? "Error closing '/bin/ls' pipe: $!" : "Exit status $? from '/bin/ls'"; }, '.' );
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Another system redirect problem
by trendle (Novice) on Jun 18, 2011 at 21:40 UTC |