Le Blanc wrote:
> Greetings,
> I have a quick question. In the code below I get an error message
> that says 'Global symbol "@fields" requires explicit package name'
> The line that causes the error is highlighted in red. Obviously it
> has to do with how I declared the variable in my subroutine.
Ok the highlights do not seem to have made it, I marked the line that is getting the
error message.
Thanks
#this is the subroutine to search the file
sub search{
open(FILE, ') {
chomp; # remove newline
my @fields = split(/\|/, $_);
# test whether the
Greetings,
I have a quick question. In the code below I get an error message that says 'Global
symbol "@fields" requires explicit package name'
The line that causes the error is highlighted in red. Obviously it has to do with how
I declared the variable in my subroutine. I tried moving curly br