[plug] Introduction and Queries
Peter Wright
pete at akira.apana.org.au
Tue Feb 5 16:26:18 WST 2002
On Tue, Feb 05, 2002 at 03:43:25PM +0800, Colin Muller wrote:
> On Tue, Feb 05, 2002 at 03:37:46PM +0800, Peter Wright wrote:
> > I thought the first 's&&' was using the '&' as a regex (substitution)
> > boundary marker, which would mean "substitute nothing with '!msfQ!'"...
> > but if so then I can't understand the bit immediately after, ie. '&s'...
>
> Break it down like this:
[ snip ]
> Then compare to this (which produces exactly the same result):
> s//!msfQ!/
> &
> s/$/utvK/
[ ... ]
Thank you for the translation, 'tis much appreciated. I feel slightly less
ignorant now.
I didn't know that you could use a '&' char by itself in Perl...
---------- snippet from perlop manpage -------------
Bitwise String Operators
Bitstrings of any size may be manipulated by the bitwise
operators (~ | & ^).
If the operands to a binary bitwise op are strings of
different sizes, or and xor ops will act as if the shorter
operand had additional zero bits on the right, while the
and op will act as if the longer operand were truncated to
the length of the shorter.
---------- snippet from perlop manpage -------------
I feel enlightened. And scared, but don't let that worry you. :)
> Colin
Pete.
--
http://akira.apana.org.au/~pete/
Thus spake the master programmer:
"A well-written program is its own heaven; a poorly-written program
is its own hell."
-- Geoffrey James, "The Tao of Programming"
More information about the plug
mailing list