Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Hashes & Arrays

by InfiniteSilence (Curate)
on Aug 29, 2005 at 19:52 UTC ( [id://487528]=note: print w/replies, xml ) Need Help??


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".

    Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Domain Nodelet?
    Node Status?
    node history
    Node Type: note [id://487528]
    help
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this?Last hourOther CB clients
    Other Users?
    Others admiring the Monastery: (2)
    As of 2024-04-26 01:17 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      No recent polls found