Mar 11, 2003 #1 lucknowm MIS Joined Jun 4, 1999 Messages 19 Location US what is error in following code : @dir = ( $d1, $d2, $d3 ); foreach ( $dir ) { chk_dir_exists ( $dir ) }; Keeps complaining "Global symbol dir requires explicit package name "
what is error in following code : @dir = ( $d1, $d2, $d3 ); foreach ( $dir ) { chk_dir_exists ( $dir ) }; Keeps complaining "Global symbol dir requires explicit package name "
Mar 11, 2003 #2 fortytwo Technical User Joined Apr 18, 2000 Messages 206 Location GB Do you have a: Code: use strict; line in your code? If so you will need something like this: Code: my @dir = ( $d1, $d2, $d3 ); foreach my $dir (@dir) { chk_dir_exists ( $dir ) }; or something like that ;-) Will. will@hellacool.co.uk http://home.hellacool.co.uk/ Upvote 0 Downvote
Do you have a: Code: use strict; line in your code? If so you will need something like this: Code: my @dir = ( $d1, $d2, $d3 ); foreach my $dir (@dir) { chk_dir_exists ( $dir ) }; or something like that ;-) Will. will@hellacool.co.uk http://home.hellacool.co.uk/