in reply to Printing last element of hash (unintentionally)
pretend %data contains something like 12::34::56::78::90::09
I'm closing my eyes and pretening really hard..... No, doesn't work..... You seem to be misinformed about the structure of hashes in Perl. You cannot have a hash containing one element, a hash (in Perl) contains key/value pairs. Please show where you set the data in %data.
Also, this code:
Replaces all occurences of "[a]" and "[b]" with "a" and "b" respectively; don't you mean $specifics =~ s/\[a\]/$a/g; instead?$specifics =~ s/\[a\]/a/g; $specifics =~ s/\[b\]/b/g;
Also also, $specifics is not being assigned any value in the piece of code you posted.
I think your problem lies in one or more of the following points (I'm using Devel::PSI here, so I might be wrong):
Good luck,
Joost.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Printing last element of hash (unintentionally)
by Anonymous Monk on Jan 03, 2004 at 21:18 UTC | |
by Joost (Canon) on Jan 03, 2004 at 21:31 UTC | |
by Anonymous Monk on Jan 03, 2004 at 21:38 UTC | |
by Joost (Canon) on Jan 03, 2004 at 22:26 UTC | |
by Anonymous Monk on Jan 03, 2004 at 23:28 UTC |