Using Perl and CGI Scripts by Bill Weinman – Chap 01 / Lesson 01

Using Perl and CGI Scripts by Bill Weinman

How do you pass (and dereference) an array of hashes to a Perl subroutine?

I though the code below would work but I think it is not dereferencing the array:

#!/usr/bin/perl

# ARRAY OF HASHES
$val[0]{‘CELL1′} = "0cell1";
$val[0]{‘CELL2′} = "0cell2";
$val[1]{‘CELL1′} = "1cell1";
$val[1]{‘CELL2′} = "1cell2";

for my $i (0..$#val) {
print "$val[$i]{‘CELL1′} $val[$i]{‘CELL2′}\n";
}

$res = &mysub(\@val);
print "RESULT: $res\n";

sub mysub {
my $ref = shift ; # $ref is a reference to an array of HASHES
my @valIN=@{$ref}; # try to dereference it

for my $i (0..$#valIN) {
print "$valIN[$i]{‘CELL1′} $valIN[$i]{‘CELL2′}\n";
}

return "DONE";
}

Google Python Class Day 1 Part 2

Google Python Class Day 1 Part 2: Lists, Sorting, and Tuples. By Nick Parlante. Support materials and exercises: code.google.com

GNU BeerFTP

In this video i’ll gonna show you how to use GNU BeerFTP an easy, fast and open FTP Client written in perl. It’s similar to other FTP clients, but with gnu BeerFTP you can save your data connection simply from command line.

legitimate work from home jobs | Event Planning Bay Area | rent video games | Homeloans | Plumbing Courses in Manchester | increase fertility | Green Drink | Photo Keyring | Vitamin D Deficiency Symptoms | skip bags | Order Fulfillment Software | virtual receptionist | Educators Credit | bodybuilding workouts | window cleaning