Creating and Dereferencing Pointers : Reference « Data Type « Perl

Perl
1. Array
2. CGI
3. Class
4. Data Type
5. Database
6. File
7. GUI
8. Hash
9. Language Basics
10. Network
11. Regular Expression
12. Report
13. Statement
14. String
15. Subroutine
16. System Functions
17. Win32
18. XML
Java
Java Tutorial
Java Source Code / Java Documentation
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Perl » Data Type » Reference 
Creating and Dereferencing Pointers
   

Assignment             Create a Reference              Dereference             Dereference with Arrow
$sca= 5;               $p = \$sca;                     print $$p;    
@arr=(4,5,6);          $p = \@arr;                     print @$p;              $p->[0]
                                                       print $$p[0];          
%hash=(key=>'value');  $p = \%hash;                    print %$p;              $p->{key}
                                                       print $$p{key};

   
    
    
  
Related examples in the same category
1. Perl 5 Dereferencing Operators
2. Perl 5 Reference Assignments
3. Reference is a scalar variable
4. Increments Reference
5. Nested reference
6. References to references
7. References, Pointers
8. Creating and dereferencing a reference
9. Creating reference for arrays
10. Demonstrates the reference syntax
11. Dereference pointer
12. Dereferencing a Reference
13. Dereferencing the Pointer
14. Direct Reference Techniques
15. Direct Scalar References
16. Exchange reference
17. Get a reference to a file handle by using '$ioreference = *name{IO};'
18. Get reference of a range
19. Get the reference of the return value from substr
20. Get the reference to a scalar by using the form '$scalarreference = *name{SCALAR};'
21. Get the reference to a subroutine by using the form '$codereference = *name{CODE};'
22. Get the value from a reference
23. A reference is a scalar variable pointing-or refering to-something else
24. Reference Modification
25. Using $$ to get the value of the reference
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.