Phoenix.pm: Perl 101
Doug Miles
doug.miles at bpxinternet.com
Fri Jul 7 12:48:32 CDT 2000
Thanks to all those who made it out last night. We had a good turnout,
and hopefully we'll get some new regulars. To answer a couple of
questions from last night (and raise a new question):
#!/usr/bin/perl
@author = ('Tom', 'Randal', 'Larry');
print "@author\n";
print @author;
print "\n";
displays this:
Tom Randal Larry
TomRandalLarry
This surprised me that 'print "@author\n";' interpolates with spaces in
between elements. Does anyone know where this is documented? I checked
perop, but couldn't seem to find it there.
Also, the range operator (..) does not work in reverse, i.e.
@author[2..1]. It only works to increment through the range, not
decrement.
--
- Doug
Don't anthropomorphize computers. They hate that.
More information about the Phoenix-pm
mailing list