Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Nested Loop Problems

by ww (Archbishop)
on May 02, 2012 at 20:46 UTC ( [id://968538]=note: print w/replies, xml ) Need Help??


in reply to Nested Loop Problems

See split. Your message (a warning, not an error, IIRC) reflects split's dis-inclination to let you split to a scalar ($list). You'll also want to read chomp for how to get those newlines out of your way.

Suggest you start with something like the following, which (sorta') follows your scheme:

my @list; for my $item(@array1) { # assumes you are reading the list into an arr +ay and also # assumes that the command between c1 and the +newline is spurious push @list, $item; }

Then write code to process @list, pushing its elements onto @w,@x,@y,@z.

Use the docs. As a guru once remarked, "You can't just make stuff up and expect the computer to understand."

Update: typos fixed (in just 3 tries); clarification about the "error" in the 1st para.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://968538]
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: (5)
As of 2024-04-24 19:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found