Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: get a certain number of words from a line

by Tomte (Priest)
on Jun 15, 2004 at 13:48 UTC ( [id://366888]=note: print w/replies, xml ) Need Help??


in reply to get a certain number of words from a line

array-slices are simpler and easier to read:

$front = join (' ', @F[0..10]); $back = join (' ', @F[11..15]);
hth

regards,
tomte


An intellectual is someone whose mind watches itself.
-- Albert Camus

Replies are listed 'Best First'.
Re^2: get a certain number of words from a line
by halley (Prior) on Jun 15, 2004 at 14:08 UTC
    Or,
    $front = "@F[0..10]"; $back = "@F[11..15]";

    --
    [ e d @ h a l l e y . c c ]

Re^2: get a certain number of words from a line
by js1 (Monk) on Jun 15, 2004 at 13:52 UTC

    Bless you tomte!

    Thanks,

    js1.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (6)
As of 2024-04-23 12:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found