Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: tagging question

by NetWallah (Canon)
on Jul 23, 2004 at 23:09 UTC ( [id://377027]=note: print w/replies, xml ) Need Help??


in reply to tagging question

Here is a snippet:
my $x='il yadayadayada'; $x=~s/^(\w{2})(.*)/<$1> $1$2 <$1>/; print $x; -- output -- <il> il yadayadayada <il>
Update:beable's (++) nit noted and picked.

    Earth first! (We'll rob the other planets later)

Replies are listed 'Best First'.
Re^2: tagging question
by beable (Friar) on Jul 23, 2004 at 23:17 UTC
    Dude, the output is supposed to be:
    <il> il yadayada <il>
    . Therefore, you should have written this:
    $x=~s/^(\w{2})(.*)/<$1> $1$2 <$1>/;
    </nitpick>

Log In?
Username:
Password:

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

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

    No recent polls found