On Sat, Feb 14, 2009 at 17:54, Kevin <kevin...@gmail.com> wrote:
>
> Could someone please direct me to some web pages where I can go through
> all deprecated perl functions and/or ways of writing perl script?  It is
> not easy for me to figure out whether an on-line example is deprecated or
> not.  I once saw:
>
> @files = <$path_to_directory>
>
> on the web and found it worked perfectly, then kept using this way of
> writing my perl script.  But I was told yesterday such a script is
> deprecated now.  I searched the internet for awhile and did not find a
> good resource.  Please give me a couple of links if you know.
snip

Did he or she say why he or she thought it was deprecated.  I really
only see one issue (besides the lack of a semicolon): you don't have a
my in front of @files.  Now it is possible @files was declared
earlier, but most often a variable, especially and array, only gets
directly assigned a value once during its life.  This leads me to
believe you are coding without the strict pragma, which is a very
large mistake in my book.

If you are interesting in learning modern Perl style I would suggest
picking up a copy of Perl Best Practices by Damian Conway.

-- 
Chas. Owens
wonkden.net
The most important skill a programmer can have is the ability to read.

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to