[ create a new paste ] login | about

Link: http://codepad.org/zyL3oh4U    [ raw code | output | fork ]

Perl, pasted on Nov 11:
1
2
3
4
5
6
7
8
%arrayname = ("key1" => "val1", "key2" => "val2");

print "Array(";
while (($key, $val) = each(%arrayname))
{
 print "\"$key\" => \"$val\",";
}
print ");";


Output:
1
Array("key2" => "val2","key1" => "val1",);


Create a new paste based on this one


Comments: