in reply to Re^2: variable name
in thread variable name
Perl doesnt have symbols (or at least, nothing like ruby's symbols), so the equivalent in perl would be something like
Note that there is no 'someSymbol' variable anywhere, but then, there isn't one in your ruby code either.$var_name_for_this = 'someSymbol';
update: to be clear, ruby's symbols (the :something construct) are NOT variables, they're values. For most purposes, ruby symbols act like strings with the advantage that you don't have to fully quote them - just a ":" at the beginning is enough:
Note that perl has something similar when using the => 'quoting comma':pair = { :name, value } # name quoted with :
$pair = { name => $value }; # name quoted with =>
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: variable name
by sh1tn (Priest) on Jul 23, 2006 at 12:33 UTC |