Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^2: get string/array slices using cut-like specifications

by jdporter (Paladin)
on Mar 10, 2011 at 12:27 UTC ( [id://892392]=note: print w/replies, xml ) Need Help??


in reply to Re: get string/array slices using cut-like specifications
in thread get string/array slices using cut-like specifications

Hm. Right. I was going by the man page linked at cut. It says, "selected input is written in the same order that it is read." I took that to mean that arbitrary order is supported and respected. What else could it mean? But I don't see any explicit mention of non-increasing order. And it does explicitly state that each "selected input... is written exactly once." I find that either vague or redundant. What is a "selected input"? If "2" occurs in the spec twice, doesn't that make the second element a selected input twice, both of which are to be written exactly once? In any case, my perl version is at least as general, if not more so, than the cut version. :-)

Obviously there are other things cut can do which I have not (yet) implemented here.

I reckon we are the only monastery ever to have a dungeon stuffed with 16,000 zombies.
  • Comment on Re^2: get string/array slices using cut-like specifications

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (8)
As of 2024-04-23 08:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found