Phoenix.pm: Code problem

EdelSys Consulting edelsys at edelsys.com
Tue Oct 12 20:27:10 CDT 1999


At 06:12 PM 10/12/1999 -0700, you wrote:
>
>
>\_ 
>\_     open ( IN_FILE, $in_file ) || die ........
>\_     open ( OUT_FILE, "> $out_file" ) || die .......
>\_     while ( <IN_FILE> )
>\_         {
>\_         print OUT_FILE $_ ;
>\_         $size = `wc -w $out_file | tr -s " " | cut -f1 -d " "` ;
>\_         print "Unix word count = $size\n" ;
>\_         }
>\_     close ....
>\_     close ....
>
>as a last hope, is $out_file a relative path'd file or is it absolute
>from the root?
>
>David
>

try

$size = `wc -w $out_file 2>&1`;

and see what happens. Also,
per David's comment, print $outfile too,
just for grins.

Tony
--
--  Anthony R. Nemmer 
--  http://www.swlink.net/~edelsys -- edelsys at swlink.net
--
--  EdelSys Consulting
--  http://www.edelsys.com/ -- edelsys at edelsys.com
--  
--  EFNet IRC Teratogen -- ICQ #14638605 -- edelsys at hotmail.com
--  (480) 968-6438 -- P.O. Box 1883, Tempe, Arizona 85280-1883
--




More information about the Phoenix-pm mailing list