How does this work?
am 27.04.2011 11:13:14 von Owen
There is a person on the Internet using this to advise his email
address.
perl -le "print scalar reverse qq/moc.liamg\100halbhalb/"
I am intrigued as to how "001\" becomes "@"
What should I be reading?
TIA
Owen
--
To unsubscribe, e-mail: beginners-unsubscribe@perl.org
For additional commands, e-mail: beginners-help@perl.org
http://learn.perl.org/
Re: How does this work?
am 27.04.2011 11:21:50 von jwkrahn
Owen wrote:
> There is a person on the Internet using this to advise his email
> address.
>
> perl -le "print scalar reverse qq/moc.liamg\100halbhalb/"
>
> I am intrigued as to how "001\" becomes "@"
"\100" is interpolated as "@" before the string is reversed.
You could also write that as:
perl -le "print scalar reverse q/moc.liamg@halbhalb/"
John
--
Any intelligent fool can make things bigger and
more complex... It takes a touch of genius -
and a lot of courage to move in the opposite
direction. -- Albert Einstein
--
To unsubscribe, e-mail: beginners-unsubscribe@perl.org
For additional commands, e-mail: beginners-help@perl.org
http://learn.perl.org/
Re: How does this work?
am 27.04.2011 11:46:07 von Ishwor Gurung
Hi Owen. G'day.
On 27 April 2011 19:13, Owen wrote:
> There is a person on the Internet using this to advise his email
> address.
>
> =A0 perl -le "print scalar reverse qq/moc.liamg\100halbhalb/"
>
> I am intrigued as to how "001\" becomes "@"
Try this :-)
perl -le "print scalar reverse qq/ua.gro.gucp\100koocr/"
\100 is '@'. Could also use \x40 (\x40 meaning it's hexadecimal):
perl -le "print scalar reverse qq/ua.gro.gucp\x40koocr/"
> What should I be reading?
Use your favourite searching and hit up "octal representation in Perl"
or something along those lines (maybe a perldoc page but I don't
remember where it is).
Cheers
[...]
--=20
Regards
Ishwor Gurung
Key id:0xa98db35e
Key fingerprint:FBEF 0D69 6DE1 C72B A5A8=A0 35FE 5A9B F3BB 4E5E 17B5
--
To unsubscribe, e-mail: beginners-unsubscribe@perl.org
For additional commands, e-mail: beginners-help@perl.org
http://learn.perl.org/
RE: How does this work?
am 27.04.2011 15:44:21 von Tim Lewis
If needed, there is a good complete table of the ASCII values at
http://www.asciitable.com/
Tim
-----Original Message-----
From: Ishwor Gurung [mailto:ishwor.gurung@gmail.com]=20
Sent: Wednesday, April 27, 2011 5:46 AM
To: Perl Beginners
Subject: Re: How does this work?
Hi Owen. G'day.
On 27 April 2011 19:13, Owen wrote:
> There is a person on the Internet using this to advise his email
> address.
>
> =A0 perl -le "print scalar reverse qq/moc.liamg\100halbhalb/"
>
> I am intrigued as to how "001\" becomes "@"
Try this :-)
perl -le "print scalar reverse qq/ua.gro.gucp\100koocr/"
\100 is '@'. Could also use \x40 (\x40 meaning it's hexadecimal):
perl -le "print scalar reverse qq/ua.gro.gucp\x40koocr/"
> What should I be reading?
Use your favourite searching and hit up "octal representation in Perl"
or something along those lines (maybe a perldoc page but I don't
remember where it is).
Cheers
[...]
--=20
Regards
Ishwor Gurung
Key id:0xa98db35e
Key fingerprint:FBEF 0D69 6DE1 C72B A5A8=A0 35FE 5A9B F3BB 4E5E 17B5
--=20
To unsubscribe, e-mail: beginners-unsubscribe@perl.org
For additional commands, e-mail: beginners-help@perl.org
http://learn.perl.org/
--
To unsubscribe, e-mail: beginners-unsubscribe@perl.org
For additional commands, e-mail: beginners-help@perl.org
http://learn.perl.org/
Re: How does this work?
am 28.04.2011 03:54:04 von Jeff Pang
2011/4/27 Tim Lewis :
> If needed, there is a good complete table of the ASCII values at
> http://www.asciitable.com/
>
Good resource.
BTW, what do "Hx" and "Oct" in the table mean?
And what's the difference between them?
Regards.
--
To unsubscribe, e-mail: beginners-unsubscribe@perl.org
For additional commands, e-mail: beginners-help@perl.org
http://learn.perl.org/
Re: How does this work?
am 28.04.2011 04:01:52 von jwkrahn
Jeff Pang wrote:
> 2011/4/27 Tim Lewis:
>> If needed, there is a good complete table of the ASCII values at
>> http://www.asciitable.com/
>>
>
> Good resource.
> BTW, what do "Hx" and "Oct" in the table mean?
> And what's the difference between them?
Hx = hexadecimal
Oct = octal
Hexadecimal is the base 16 representation of a decimal (base 10) number
and octal is the base 8 representation.
If you are on Linux you can get the same table with:
man ascii
John
--
Any intelligent fool can make things bigger and
more complex... It takes a touch of genius -
and a lot of courage to move in the opposite
direction. -- Albert Einstein
--
To unsubscribe, e-mail: beginners-unsubscribe@perl.org
For additional commands, e-mail: beginners-help@perl.org
http://learn.perl.org/