Why use backslash before the array and hash varible? 
Author Message
 Why use backslash before the array and hash varible?

Hello,

I often see somebody uses \ before the array and hash varible(for

using backslash? Thanks a lot!

Andrew



Fri, 14 May 2004 18:00:12 GMT  
 Why use backslash before the array and hash varible?


| Hello,
|
| I often see somebody uses \ before the array and hash varible(for

| using backslash? Thanks a lot!

This will make a reference to the array or hash. It works with scalars, too.



print $ref->[0]; # prints a


Please read perldata dn perlref for more info.

Steffen
--
$_=q;0cb212c210b0bb010c0113bb0c410c0b516c0bb3d212c2b0b0b016b6cb2b2c21010c0
b41110b3bba0e0c0d2c4b2b6bc013d2c0d0b01012b0b0;;s/\n//g;s/(\d)/$1<2?$1:'0'x




Fri, 14 May 2004 18:10:19 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. URGENT: Hash in Hash, Array in Array, Array in Hash, Hash in Array

2. complex foreach loop with deep hashes (sorted hash slices (using an array for keys))

3. hash of values and array of hashes of values and array of hashes

4. hash of arrays using variable array names

5. Please help with Array of Array with a Hash, using pstore/Storable.pm

6. split using varible length white spaces as field separators

7. Why does shellwords eat backslashes?

8. array/hash to file to array/hash

9. Simple Perl5 question (hash-array of hash-array refs)

10. question regarding hash hash hash of array

11. Help with perl hashes of hashes and arrays of hashes etc

12. baby steps with complex hashes of hashes of hashes of arrays

 

 
Powered by phpBB® Forum Software