Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Re: quotewords doesn't return a list

by zemplen (Novice)
on Oct 10, 2003 at 19:12 UTC ( #298375=note: print w/ replies, xml ) Need Help??


in reply to Re: quotewords doesn't return a list
in thread quotewords doesn't return a list

Adding a print statment or using the debugger shows that @list is empty.
If I add $master = "1    2    3    4    foo  bar    7    8    9"; to the program then it returns a list as expected. The problem appears to be tied to getting the data from a file.
I am running Activestate perl, v5.8.0 built for MSWin32-x86-multi-thread


Comment on Re: Re: quotewords doesn't return a list
Download Code
Re: Re: Re: quotewords doesn't return a list
by snax (Friar) on Oct 10, 2003 at 19:58 UTC
    How odd. Using a file (master.txt as you suggest) and the offered input data (tab separated)
    1 2 3 4 foo bar 7 8 9
    I have no problems: I get a list as expected. However, after adding a single and double quote
    1 2 3 4 foo bar 7 8 9 ' "
    things behave as you describe: an empty list results. As such I concluded that Enlil got it right, and there's a bug/behavior problem associated with unmatched quotes in the Text::ParseWords module.

    I'm testing this with 5.8.0 (Cygwin) and 5.6.1 (Activestate).

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (6)
As of 2014-08-29 01:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (275 votes), past polls