in reply to Re^4: What is the right way of concatenating strings
in thread What is the right way of concatenating strings
Many functions in Perl can be called with a variable number of arguments. For example, split:
split /PATTERN/,EXPR,LIMIT split /PATTERN/,EXPR split /PATTERN/
In this case, Perl will assume some default values for the arguments you don't specify. In the case of open, you can do:
open FILEHANDLE,EXPR open FILEHANDLE,MODE,EXPR open FILEHANDLE,MODE,EXPR,LIST open FILEHANDLE,MODE,REFERENCE open FILEHANDLE
As you can see, there's more than one way to do it :^). You're being advised to use the three argument form of open, which normally reads like this:
open $fd, '<', 'input_file' or die "open: $!"; ## <-- you should always check for errors.my $input = do {local %/; <AA>;};
As for this, first take a look to Coping with scoping to understand what local means.
--
David Serrano
|
|---|