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

RE: RE: Re: Unexpected Array

by autark (Friar)
on Nov 13, 2000 at 23:38 UTC ( #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
Node Status?
node history
Node Type: note [id://41395]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (4)
As of 2020-12-06 01:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How often do you use taint mode?





    Results (65 votes). Check out past polls.

    Notices?