On Tue, Jul 28, 2009 at 13:11, Bryan R
Harris<bryan_r_har...@raytheon.com> wrote:
snip
> Wow, I wish I'd read this email before sending that last one.  The
> perldoc.perl.org site has gotten a tremendous upgrade, it's beautiful now.
> It also explains the whole local($_) thing, though it doesn't really explain
> "why", just "that".
snip

I actually find the new style annoying.  The floating toolbar obscures
part of the doc, especially when you use a target like
#Temporary-Values-via-local().  Part of your confusion probably comes
from that.  This part of the text is blocked by the floating bar:

    WARNING: In general, you should be using my instead of local,
    because it's faster and safer. Exceptions to this include the
    global punctuation variables, global filehandles and formats,
    and direct manipulation of the Perl symbol table itself. local
    is mostly used when the current value of a variable must be
    visible to called subroutines.

snip
> That feels like a really bad idea for me, though, since I'm writing scripts
> where my primary goal is portability.  Having my own compiled copy seems
> like a recipe for disaster if I need others to be able to run it just like I
> do.
snip

Writing portable code is not harmed by having your own compiled copy
of Perl.  However, if you want your code to work on machine with 5.8
(and there are a lot of them still out there) then you can't take
advantage of the 5.10 features.  Another option is to use
[Par::Packer][0] to create an executable program with no dependencies
(Perl does not even need to be installed); however, that executable
will only work on the OS it was create on.

[0] : http://search.cpan.org/dist/PAR-Packer/lib/pp.pm

-- 
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