in reply to Re^2: variable name
in thread variable name

sorry, but symbols have nothing to do with variables; they're just "fast strings".

Perl doesnt have symbols (or at least, nothing like ruby's symbols), so the equivalent in perl would be something like

$var_name_for_this = 'someSymbol';
Note that there is no 'someSymbol' variable anywhere, but then, there isn't one in your ruby code either.

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:

pair = { :name, value } # name quoted with :
Note that perl has something similar when using the => 'quoting comma':
$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
    Thanks ++ :)