in reply to Hashes & Arrays

Well, if this is homework you still need to read up on several things:
  • Perl Arrays
  • Perl Hashes
  • Autovivification (sp?)
    perl -MData::Dumper -e "%Rhash = ('email'=>'email\@email',timestamp=>s +calar localtime()); $dummyArray[0] = \%Rhash; $Phash{'woowo'} = \@dum +myArray; print Dumper %Phash;" $VAR1 = 'woowo'; $VAR2 = [ { 'email' => 'email\\@email', 'timestamp' => 'Mon Aug 29 14:50:52 2005' } ]; C:\>

    Celebrate Intellectual Diversity

  • Replies are listed 'Best First'.
    Re^2: Hashes & Arrays
    by ikegami (Patriarch) on Aug 29, 2005 at 20:07 UTC
      Most people forget to escape special characters. You did the opposite and added a slash to the email address. When using single quotes or the q quote-like operator, \ is not an escape character unless followed by the string literal terminator (single quote) or another \. That's not the case here. 'email\@address' should be 'email@address' or "email\@address".