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

Re^3: Split tags and words nicely

by johngg (Canon)
on Dec 29, 2006 at 10:37 UTC ( [id://592197]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Split tags and words nicely
in thread Split tags and words nicely

You have a slight glitch in that you are losing any text after the space, e.g. "and more" comes out as "and". Fix:

$a =~ s/(<\/?tag[^>]*>)([\w ]*)/push @b, ($1,$2)/eg;

Also it is probably a good idea to avoid $a and $b for variable names because of their special status with regard to sort.

Cheers,

JohnGG

Replies are listed 'Best First'.
Re^4: Split tags and words nicely
by logie17 (Friar) on Dec 31, 2006 at 02:18 UTC
    Doh! Nice catch. Good call with $a, $b.

    Cheers!
    s;;5776?12321=10609$d=9409:12100$xx;;s;(\d*);push @_,$1;eg;map{print chr(sqrt($_))."\n"} @_;

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (4)
As of 2024-03-19 03:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found