Kevin Pfeiffer wrote:
> In article <[EMAIL PROTECTED]>, Rob Dixon
> wrote:
>
> > Well done Kevin!
> >
> > Just a couple of points.
>
> Am I surprised? ;-)
>
> > > sub pad_keys {
> > >my $ref = shift;
> > >if (ref $ref eq "HASH") {
> > > for my $value (%$ref) {
> >
> > This will loop o
Rob Dixon wrote:
> John W. Krahn wrote:
> > Rob Dixon wrote:
> > >
> > > Well done Kevin!
> > >
> > > Just a couple of points.
> > >
> > > Kevin Pfeiffer wrote:
> > > >
> > > > (I noticed that, too.) But thanks to your tip I think I've
> > > > created my first recursive sub-routine (only tested on
John W. Krahn wrote:
> Rob Dixon wrote:
> >
> > Well done Kevin!
> >
> > Just a couple of points.
> >
> > Kevin Pfeiffer wrote:
> > >
> > > (I noticed that, too.) But thanks to your tip I think I've
> > > created my first recursive sub-routine (only tested on this
> > > example). If it does what th
On Fri, Jul 11, 2003 at 02:17:52PM -0700, John W. Krahn wrote:
> Rob Dixon wrote:
> > sub pad_keys {
> > foreach (keys %$ref) {
> > pad_keys($ref->{$_});
> > next unless (my $new = $_) =~ tr/ /_/;
> > if (exists $ref->{$new}) {
> > warn "Padded key $new already exist
In article <[EMAIL PROTECTED]>, John W. Krahn wrote:
[...]
> Kevin and Rob,
>
> perldoc -q "add or remove keys from a hash"
>
> Found in /usr/lib/perl5/5.6.0/pod/perlfaq4.pod
>What happens if I add or remove keys from a hash while
>iterating over it?
>
>Don't do that. :
Rob Dixon wrote:
>
> Well done Kevin!
>
> Just a couple of points.
>
> Kevin Pfeiffer wrote:
> >
> > (I noticed that, too.) But thanks to your tip I think I've created
> > my first recursive sub-routine (only tested on this example). If it
> > does what the OP requested (and y'all don't find too
In article <[EMAIL PROTECTED]>, Rob Dixon wrote:
> Well done Kevin!
>
> Just a couple of points.
Am I surprised? ;-)
>> sub pad_keys {
>>my $ref = shift;
>>if (ref $ref eq "HASH") {
>> for my $value (%$ref) {
>
> This will loop over all the keys and values in the
> hash, in the o
y, July 11, 2003 10:28 AM
To: [EMAIL PROTECTED]
Subject: Re: joining keys
Well done Kevin!
Just a couple of points.
Kevin Pfeiffer wrote:
> In article <[EMAIL PROTECTED]>, John W. Krahn wrote:
>
> > Sharad Gupta wrote:
> > >
> > > Hi Friends,
> >
> >
Well done Kevin!
Just a couple of points.
Kevin Pfeiffer wrote:
> In article <[EMAIL PROTECTED]>, John W. Krahn wrote:
>
> > Sharad Gupta wrote:
> > >
> > > Hi Friends,
> >
> > Hello,
>
> Hi,
>
> > > I have a hash whose values can be either array, hash etc.
> > >
> > > say i have:
> > >
> > > my
In article <[EMAIL PROTECTED]>, John W. Krahn wrote:
> Sharad Gupta wrote:
>>
>> Hi Friends,
>
> Hello,
Hi,
>> I have a hash whose values can be either array, hash etc.
>>
>> say i have:
>>
>> my $self = {
>> 'hello how' => {
>> 'r u' => 'I am',
>>
>>
>
Sharad Gupta wrote:
>
> Hi Friends,
Hello,
> I have a hash whose values can be either array, hash etc.
>
> say i have:
>
> my $self = {
> 'hello how' => {
> 'r u' => 'I am',
>
>
> },
> 'fine thank' => ['you'],
> 'see ya'=> 'next ti
Hi Friends,
I have a hash whose values can be either array, hash etc.
say i have:
my $self = {
'hello how' => {
'r u' => 'I am',
12 matches
Mail list logo