Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Sentances from arrays

by cwest (Friar)
on Nov 28, 2000 at 05:40 UTC ( [id://43589]=note: print w/replies, xml ) Need Help??


in reply to Sentances from arrays

my $sentence = join @array > 2 ? ', ' : ' ', @array > 1 ? ( @array[0..$#array-1], 'and '.$array[-1] +) : @array;
--
Casey
   I am a superhero.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (7)
As of 2024-04-18 10:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found