Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^3: Perl can do it, take 1 (sentence generation)

by ikegami (Patriarch)
on Jun 17, 2005 at 15:35 UTC ( [id://467768]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Perl can do it, take 1 (sentence generation)
in thread Perl can do it, take 1 (sentence generation)

I dread +shift (and anything with a + to force scalar context, it just looks so kludgy...), I guess you could use $_0 instead ?

Yes. Or add my ($var) = @_ then use $var.

Why are you using quotemeta ?

In case there are any special characters in the words being joined. If there was a "*" in the word, for example, it would need to be escaped because we're forming a regexp. That's exactly what quotemeta does.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (4)
As of 2024-03-28 15:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found