On Thu, Sep 17, 2009 at 8:22 PM, Uri Guttman wrote:
> the strange way is because that is how perl does it. perl doesn't have a
> proper macro mechanism which is how many langs do constants. so it needs
> something that is parsed in perl and subs with empty prototypes work
> well. the compiler see
On Thu, Sep 17, 2009 at 8:18 PM, Chas. Owens wrote:
> Ah, use constant is just sugar for what he is doing. And, given that
> he is only adding the constants because they don't exist in very old
> versions of Perl, it is likely that he is trying to support a version
> of Perl prior to 5.004 (whic
On Thu, Sep 17, 2009 at 7:45 PM, Chas. Owens wrote:
> Constants have a value beyond the numbers themselves. Let's suppose
> that there is a non-POSIX system that has a seek function that works
> quite a bit like POSIX seek, but it use different values for beginning
> of file, current location, e
On Thu, Sep 17, 2009 at 5:56 PM, Uri Guttman wrote:
> hopefully that explains it.
Unfortunately, not really :)
I *know* about the symbol table and typeglobs, but I yet have to
*understand* how it all works, and how to use it.
My first question here - before everything else - is: why subs to ju
After reading Uri's post about projects for beginners, I took a quick
look at File::Slurp source code, and I was stuck at the very beginning.
My knowledge of Perl is still very beginner level, but I want - time
allowing - to improve as I like the language very much.
Anyway, the code starts with t
On Fri, Jul 10, 2009 at 9:25 PM, Gunnar Hjalmarsson wrote:
> You can use a hash slice.
>
> �...@{ $data{$key} }{ @fields } = split /:/, $val;
Thanks Gunnar, your suggestion is enlightening.
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...
Hello everybody, I have two lists and I want to merge them like this:
element 1 of list A, element 1 of list B, A2, B2, A3, B3, etc.
I need this to create a sequence of key/value for an anonymous hash.
I'm using this code:
# @fields contains the names of the hash keys
# $val is a st