programming-examples/perl/Datatype/Perl 5 Reference Assignments.pl

14 lines
573 B
Perl
Raw Normal View History

2019-11-15 12:59:38 +01:00
Data Type Operator Example
Scalar \$var $car = \$Porsche;
Array \@array $allStores[$number] = \@storeInventory;
Hash \%hash $storeType = \%stores;
File handle \*FILEHANDLE $inputReference = \*STDIN;
Constant \literal $pi = \3.4;
Subroutine \&subRoutine $callBack = \&numericSort;
Symbolic \$variableName $var ="var2"; $var2Ref = \$var;