Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Re: Insane Uses for Perl

by jj808 (Hermit)
on Sep 15, 2002 at 14:07 UTC ( [id://198036]=note: print w/replies, xml ) Need Help??


in reply to Re: Insane Uses for Perl
in thread Insane Uses for Perl

I think that Sigmund is trying to use the s character as the delimeter in a substitution. Replacing this with / changes the code from
perl -le 's ssSss.s sSsSiss.s s$sSss.ss .$s\107ss.print'
to
perl -le 's //S/s.s /S/Sis/.s /$/S/s.s/ .$/\107/s.print'
This prints
SisS
Sigmund, is this correct?

UPDATE:
I have just read this node: Beware the S ! where Sigmund explains his signature, so it would appear that there was just a typo in the original post.

The correct version,

perl -le 's ssSss.s sSsSiss.s s$sSss.s s.$s\107ss.print'
works fine and prints
SiG
Basically the 16th s should have been after the space, not before it.

JJ

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (7)
As of 2024-04-25 15:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found