Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

You're right about the shell metacharacters - and their substitution should really happen along with the control characters. I don't know why I thought [:cntrl:] would include them, it logically doesn't. To me the space is more than just another metacharacter - it breaks more things than the others. (Trivially fixed, contrived example: for F in * ; do ls $F ; done)

You can bundle short options, as you can see from the source - Getopt::Long::Configure('bundling', 'no_ignore_case');. But you can't specify downcasing independently - that's why I included it by having a third -z. Besides, I kinda liked the -zzz visual.. maybe I should add a -Z option as well? ;^) Now that I think about it though, maybe sanitizing names should indeed not be a simple option, not a mode.

I also discovered another independent derivative of Larry's rename script on CPAN just after I posted this one, with rather different goals (and pretty messy innards).

So there's plenty of things to move around and more yet to add. Expect a New And Improved version in the near future. :) (For now, this version scratches me quite excellently, and I have other things to do, so the pressure is low.)

Makeshifts last the longest.


In reply to Re^2: rename - an improved version of the script which comes with Perl by Aristotle
in thread rename 0.2 - an improved version of the script which comes with Perl by Aristotle

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (7)
As of 2024-04-19 09:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found