[VPM] January and February Victoria Perl Mongers meetings
Peter Scott
Peter at PSDT.com
Fri Dec 29 17:28:00 PST 2006
Following specific requests from members, our next two meetings will
deal with these topics:
January 16: Array operations; Introduction to hashes
February: Installing CPAN modules
I'll be presenting, drawing materials from my classes and books. These
are aimed at beginners but there will be a few things thrown in there
for not-so-beginners. Anyone who thinks the basic stuff like, say,
lists, is beneath them is invited to determine in advance what the
following program will print and then see how well they did :-)
#!/usr/local/bin/perl -l
use strict;
use warnings;
my $x;
$x = (5, 6, 7);
print " 1: $x";
($x) = (5, 6, 7);
print " 2: $x";
$x = 5..7;
print " 3: $x";
($x) = 5..7;
print " 4: $x";
$x = foo();
print " 5: $x";
($x) = foo();
print " 6: $x";
$x = bar();
print " 7: $x";
($x) = bar();
print " 8: $x";
$x = () = (5, 6, 7);
print " 9: $x";
$x = () = 5..7;
print "10: $x";
sub foo {
return (5, 6, 7);
}
sub bar {
my @a = (5, 6, 7);
return @a;
}
--
Peter Scott
Pacific Systems Design Technologies
http://www.perldebugged.com/
http://www.perlmedic.com/
More information about the Victoria-pm
mailing list