Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

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

by ikegami (Pope)
on Jun 17, 2005 at 15:35 UTC ( #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
Node Status?
node history
Node Type: note [id://467768]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (5)
As of 2020-06-06 15:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you really want to know if there is extraterrestrial life?



    Results (41 votes). Check out past polls.

    Notices?