in reply to Re: lwp-download program
in thread lwp-download program
I will try your suggestion to use system instead of the subroutine.# Check if the file is already present if (-f $file && -t) { $shown = 1; print "Overwrite $file? [y] "; my $ans = <STDIN>; unless (defined($ans) && $ans =~ /^y?\n/) + { if (defined $ans) { print "Ok, aborting.\n"; } else { print "\nAborting.\n"; } exit 1; } $shown = 0; } else { print "Saving to '$file'...\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: lwp-download program
by pccode (Novice) on May 29, 2005 at 20:32 UTC |