Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
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
Domain Nodelet?
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 chilling in the Monastery: (None)
    As of 2022-01-26 04:56 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?
      In 2022, my preferred method to securely store passwords is:












      Results (69 votes). Check out past polls.

      Notices?