#!/usr/bin/perl use strict; use warnings; sub foo1 { return undef; } sub foo2 { return (undef); } sub foo3 { return(undef); } sub foo4 { my @myarr; return @myarr; } sub foo5 { my @myarr; return (@myarr); } sub foo6 { my @myarr; return(@myarr); } sub foo7 { return 1; } sub foo8 { return (1); } sub foo9 { return(1); } use Data::Dumper; my @arr1 = foo1(); my @arr2 = foo2(); my @arr3 = foo3(); my @arr4 = foo4(); my @arr5 = foo5(); my @arr6 = foo6(); my @arr7 = foo7(); my @arr8 = foo8(); my @arr9 = foo9(); print Dumper \@arr1; print Dumper \@arr2; print Dumper \@arr3; print Dumper \@arr4; print Dumper \@arr5; print Dumper \@arr6; print Dumper \@arr7; print Dumper \@arr8; print Dumper \@arr9;