Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Better Way to Do it 2

by tedrek (Pilgrim)
on Aug 27, 2003 at 23:02 UTC ( #287198=note: print w/replies, xml ) Need Help??


in reply to Better Way to Do it 2

and still shrinking

perl -pi -e '$_=reverse'

Update: yep as MarkM points out this reverses each line, not the order of lines :(.

Replies are listed 'Best First'.
Re: Re: Better Way to Do it 2
by MarkM (Curate) on Aug 28, 2003 at 15:59 UTC

    Unless I'm missing something, your solution doesn't work. You are using reverse in scalar context, which reverses the order of the string, not the order of the lines.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (2)
As of 2021-09-19 10:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?