Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Optimize file renaming.

by polettix (Vicar)
on May 26, 2005 at 11:59 UTC ( [id://460626]=note: print w/replies, xml ) Need Help??


in reply to Optimize file renaming.

  • I don't understand why you reverse the file list.
  • Is the print necessary?
You could pad with zeroes using sprintf:
$name = sprintf "%03d", $name;
or, in a more general way:
my $padstring = '0'; my $minlength = 3; $name = ($padstring x ($minlength - length($name))) . $name;

Flavio (perl -e 'print(scalar(reverse("\nti.xittelop\@oivalf")))')

Don't fool yourself.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://460626]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2025-05-23 21:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.