in reply to Re^2: Perl Style: Is initializing variables considered taboo?
in thread Perl Style: Is initializing variables considered taboo?

I've read through the posts and there is certainly a lot of verbage here!

As long as you aren't using the very ancient C style where all the variables had to be declared at the beginning of the sub instead of when they are first used or close to where they are first used as in modern C, I don't see any problem at all.

Often I see my @x=(); vs just my @x;, but I don't see any big point to get really riled up about! I seldom see a statement with a scalar like my $x=undef; vs my $x; because something happens with $x in the next line or two. An array or hash declaration happens more often closer to the beginning of the code and can have a wider distance between declaration and use.

Of the universe of style issues, this issue probably shouldn't be at the "top of your hit parade".