Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Cleaning Data Between Specified Columns

by Fletch (Bishop)
on Jan 27, 2003 at 19:51 UTC ( #230331=note: print w/replies, xml ) Need Help??


in reply to Cleaning Data Between Specified Columns

You can use the fact that the return value from substr() is an lvalue and do something like:

{ local *tmp = \substr( $source, $start, $len ); $tmp =~ y/'//d; $tmp =~ y/a-zA-Z0-9\n\|-/ /c; }

Replies are listed 'Best First'.
Re^2: Cleaning Data Between Specified Columns
by Aristotle (Chancellor) on Jan 28, 2003 at 01:51 UTC
    Damn. That's great. :) And with a little change it's strict compliant and shorter too:
    { local *_ = \substr $source, $start, $len; y/a-zA-Z0-9\n\|-/ /c; y/'//d; }
    Update: changed order of transliterations to account for the deletion of characters causing extra characters to shift in.

    Makeshifts last the longest.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2023-11-29 01:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?