- or download this
foreach my $name (@names) {
if ($dbpattern{$name} =~ /$pattern/i or $dbcolor{$name} =~ /$color/
+i) {
# print out the record
}
}
- or download this
$i =0;
while (my $name[$i] = <DBFILE>) {
...
# now go on as before ...
$i++;
}
- or download this
superpicture|TerraCotta|Offset Brick|5
- or download this
chomp $line;
my @record = split /\|/, $line, 4;
# $record[0] is name, 1 => color 2 => pattern, etc.
- or download this
perl -e 'print "How sweet does a rose smell? "; chomp ($n = <STDIN>);
+$rose = "smells sweet to degree $n"; *other_name = *rose; print "$oth
+er_name\n"'