Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
Well, I know that the tr operator expects a list of characters, but some of them have special meaning such as the minus sign. Where perlop.html talks about the tr operator, it says,

"A character range may be specified with a hyphen, so tr/A-J/0-9/ does + the same replacement as tr/ACEGIBDFHJ/0246813579/. For sed devotees, + y is provided as a synonym for tr. If the SEARCHLIST is delimited by + bracketing quotes, the REPLACEMENTLIST has its own pair of quotes, w +hich may or may not be bracketing quotes, e.g., tr[[A-Z]][[a-z]] or t +r(+\-*/)/ABCD/."

I don't understand what this means. I just know that certain characters have special meanings following the tr operator, so to be on the safe side, I just put a backslash before each.


In reply to Re^3: Removing unwanted chars from filename. by harangzsolt33
in thread Removing unwanted chars from filename. by Anonymous Monk

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 having a coffee break in the Monastery: (3)
As of 2024-06-24 20:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.