in reply to variable reference problem

Thanks for providing your code, but it's very hard to read without formatting. Please use 'code' tags as described in Writeup Formatting Tips, as follows:

while (<$fhlog>) { my $line = $_; my $bufferline; if ($line =~ /Finished (.*)\. Wrote (\d+) new, (\d+) duplicates, ( +\d+) archived/) { &storeAdapterDetails($1, $2, $3, $4, $fhresult); next; } if ($line =~ /ERROR/) { $bufferline = '$line'; next; } if ($line =~ /.*Exception:/) { print "Found adapter: ".$bufferline; $flag = 1; }

Some comments:

Hope this helps

Replies are listed 'Best First'.
Re^2: variable reference problem
by priyankgandhi (Novice) on Sep 12, 2008 at 08:34 UTC
    Hi thanks for your help.
    You cleared many of my doubts.

    Re: 2nd point
    I dont know any difference in calling subroutine with '&' or without '&'. Can you explain me?

    Thanks for the Writing Formatting link. I will follow the standards.

      "&" causes Perl to ignore the sub's prototype.

      Some people use "&" to indicate a user sub, since it can only be used on subs, not on builtin functions. But I think that's a bad idea since "&" is not just decorative.

      You might be interested in reading (tye)Re: A question of style.