Twitter Updates

Thursday 23 April 2009

Perl Variables

#Perl comments use #hash

Some general perl variables:
$scalar = 1 ; #String, integers, floats
print $scalar ;

@array = ("apple", "pair");
print $array[0];
print $array[1];

%hash = ();
$hash{"apple"} = 100;
$hash{"pair"} = 200;
print "Cost is $hash{"apple"} \n";

No comments: