in reply to Re: Using constants. What am I doing wrong?
in thread Using constants. What am I doing wrong?
>perl -le'BEGIN{$BASE="are belong to us"} use constant BASE => $BASE; print "all your base ", BASE' all your base are belong to us >
I though that would work too but it does not for me
But I guess the OP was after something more flexible> perl -le'BEGIN{$BASE="are belong to us"} use constant BASE => $BASE; print "all your base ", BASE' all your base > # but this does >perl -le'use constant BASE=>"are belong to us"; print "all your base ", BASE' all your base are belong to us >
Cheers,
R.
|
---|