Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

RE: RE: Re: Unexpected Array

by autark (Friar)
on Nov 13, 2000 at 23:38 UTC ( [id://41395]=note: print w/replies, xml ) Need Help??


in reply to RE: Re: Unexpected Array
in thread Unexpected Array

It seems to me that you want to create an array containing the words of the file. If you split on space like you have done split / /, $item, then you will only split on one space. I think you want to split on:
split /\s+/, $item
or just:
split ' ', $item
The last one will strip all blanks at the start as well as on the end of the string.

Autark

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (7)
As of 2024-03-28 13:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found