http://qs321.pair.com?node_id=764432


in reply to Re: RE: A whirleygig for a progress indicator for scripts
in thread A whirleygig for a progress indicator for scripts

Is there anyway i can use Whirley with File::Copy ?

I want to show a progress meter (percentage) while moving a file.
I found http://www.perlmonks.org/?node=File%20copy%20progress. but that doesn't use File::Copy and dont know if it working for large files.
Or can i do something like;

my $sizetarget= (-s $destination); my $sizesource= (-s $source); my $percentage=""; while (move($source,$destination) || print "$!\n") { $sizetarget = (-s $destination); $percentage = ($sizetarget / $sizesource)*100; print "[$percentage\%]\r"; }
hmm nope that doesnt work.. anyways you get my point.
Hope anyone can give me an example or a hand :).
greets,
Wire64