Web Hosting Forum | Lunarpages

Author Topic: variable?  (Read 8980 times)

Offline android45

  • Spaceship Captain
  • *****
  • Posts: 110
variable?
« on: November 05, 2012, 01:25:13 AM »
Can somebody please tell me what do the symbols $ @ and % mean when prefixing a variable? Thanks in advance.

Offline Pete

  • Alien Anomaly
  • Senior Moderator
  • Professor in Nanotechnology
  • *****
  • Posts: 4258
    • X-Visions Website Design
Re: variable?
« Reply #1 on: November 05, 2012, 04:56:49 AM »
A bit scary when a "Mobile Application Development" company post on a forum asking about technical issues.
I know your only posting to get backlinks but..............I would not want to let your company to do any work for me as it looks like you dont know what your doing  !!!!
x-visions.com


As I'm always saying.. (But nobody listens)
"Take a step back.. Take a deep breath and see if there a simple solution there, thats hiding" lol  :DLunarpages Web Hosting   Lunarpages Forums  Lunarpages Affiliate Program

Offline annaharris

  • Spacescooter Operator
  • *****
  • Posts: 48
    • PHP Development Comapny
Re: variable?
« Reply #2 on: May 07, 2013, 04:17:55 AM »
"$" means it is a variable, "@" means it is an array and "%" means it is a hash.

Offline MrPhil

  • Senior Moderator
  • Berserker Poster
  • *****
  • Posts: 6187
Re: variable?
« Reply #3 on: May 07, 2013, 04:51:04 AM »
'$' is, more specifically, a scalar value, including not only simple variables but also references and slices of multidimensional arrays. In Perl, when to use $, @, and % can be very confusing to figure out until you're quite experienced. Depending on how you're handling a variable, you can find yourself switching back and forth between $ and @ or %.
Visit My Site

E-mail Me
  
-= From the ashes shall rise a sooty tern =-

 

Share |