Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Re: Insane Uses for Perl

by jj808 (Hermit)
on Sep 15, 2002 at 14:07 UTC ( #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
Node Status?
node history
Node Type: note [id://198036]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (5)
As of 2020-10-20 15:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (210 votes). Check out past polls.

    Notices?