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;
- Please edit your post to include "code" tags: Writeup Formatting Tips
|
---|
In Section
Seekers of Perl Wisdom