Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: 3 member list ouput

by toolic (Bishop)
on Sep 25, 2018 at 14:44 UTC ( #1222978=note: print w/replies, xml ) Need Help??


in reply to 3 member list ouput

The problem is that your code evaluates the arrays in scalar context, which returns the number of elements in the array. One way to evaluate the arrays in list context is to change the period to a comma in your say lines:
use feature 'say'; say "Please enter 3 string variables, :" . "(Please crtl-D after ente +ring strings)\n "; @lines = <STDIN>; say 'Here ', @lines; chomp(@lines); @backwards = reverse(@lines); say "Here are the values in reverse order:", @backwards;

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (2)
As of 2020-10-24 18:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (246 votes). Check out past polls.

    Notices?