Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

merlyn (47)

merlyn
  merlyn@stonehenge.com
http://www.stonehenge.com/merlyn/
AOL IM: realmerlyn (Add Buddy, Send Message)
Yahoo! ID: realmerlyn (Add User, Send Message)

PAUSE-ID: MERLYN [cpan.org].
See my home page [stonehenge.com].

Journal of merlyn (47)

Wednesday November 24, 2004
05:50 PM

"intro to Perl" in spanish

[ #21993 ]
I'm attending (and presenting at) GULEV Congreso Internacional de Software Libre 2004 , which is apparently primarily in spanish. My spanish is mostly "which way to the airport" and "no more beer", but I figured I'd sit in on an intro to Perl course. Wow.

One thing I learned was that $! is internationalized, so the error messages might not match, even on linux, if you're looking for

$! =~ /permission denied/

and such. Hmm... I have to rethink some of my programs.

Another reason to watch this Salvador Ortiz Garcia give his Perl class even though I don't understand anything but the keywords is that I want to know what he has covered before I give my "intro to objects" talk tomorrow, and backfill appropriately.

Although, if you're sitting in a brand new intro class, it's unlikely you'd want to spend hours 11 through 14 of your Perl exposure learning about objects, so I think I can presume that nobody's gonna try to drink from the firehose here.

Another thing that is shocking is that it seems about 2:1 for male-female, unlike similar conferences in the US which are about 10:1 in my experience. Perhaps the mexican schools don't create the "girls can't do math" stigma that the US schools do. Hmm. Need to look into that further.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • Hmmm, slash doesn't like a subject consisting solely of $!...

    I thought that's why the %! hash was there, so you can say die $! if $! && $!{EPERM}.

    -Dom

    • Wow, I didn't even know that %! existed! It's a recent addition to the language, isn't it? It looks very useful.

    • Oh yeah, speaking of dollar... from what I can make out, they pronounce $ as "pesos". I wonder if their strings are 1/10th as long, then. {grin}
      --
      • Randal L. Schwartz
      • Stonehenge
    • $! && $!{EPERM}
      Still, I prefer the somewhat easier to read and type
      $! == EPERM
      Even though that requires use Errno qw(EPERM);.
    • You shouldn't have to test if $! is true. It'll always be true, left over from some failed system call from the beginning of the Perl program generally. You should die only if the thing you just tried to do "failed" at a Perl level, and only then check $! to see what kind of failure you have.

      It's a common mistake, and it looks like you were making it. {grin}

      --
      • Randal L. Schwartz
      • Stonehenge
  • From perlport:

    Don't count on specific values of $!, neither numeric nor especially the strings values-- users may switch their locales causing error messages to be translated into their languages. If you can trust a POSIX-ish environment, you can portably use the symbols defined by the Errno module, like ENOENT. And don't trust on the values of $! at all except immediately after a failed system call.

    I think a lot of people thought perlport was only for Mac and Windows users, but it is casts a wider net