Phoenix.pm: Code problem
Phaedrus
phaedrus at endless.org
Tue Oct 12 18:06:38 CDT 1999
On Tue, 12 Oct 1999, Giffin Ron-P08295 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 " "` ;
Try -f2. The output of tr is something like " 199 file ". As far as (my)
cut is concerned, the first field is "blank".
That should do'er.
Cheers!
-scott
> print "Unix word count = $size\n" ;
> }
> close ....
> close ....
>
> $size is always 0 ---- What's wrong with this ( bet I going to be
> embarrassed )
>
>
> -- Ron
>
>
More information about the Phoenix-pm
mailing list