On 14/08/2011 23:19, Rajeev Prasad wrote:
in this simple example. i am not able to figure what is the bitwise
funtion doing:
my @subArray = grep { $_& 1 } @array;
The & operator requires the types of its operands to be identical -
either string or numeric. In either case the values are ANDed
On Thu, Mar 20, 2008 at 2:17 AM, Rajanikanth Dandamudi
<[EMAIL PROTECTED]> wrote:
>
> Hi Chas. Owens,
>
> Thanks a lot for the clarification. Finally I would like to understand how
> to find that the character \x{01} is getting printed. It is not visible onto
> the standard output display.
snip
Hi Chas. Owens,
Thanks a lot for the clarification. Finally I would like to understand
how to find that the character \x{01} is getting printed. It is not
visible onto the standard output display.
Thanks and Regards,
Rajanikanth
--
Rajanikanth
ASIC, Texas Instruments India
Phone : +91-80-250
On Wed, Mar 19, 2008 at 9:32 AM, Rajanikanth Dandamudi
<[EMAIL PROTECTED]> wrote:
> Hi All,
>
> I would like to understand the behavior of the following program:
snip
> my @a=qw(1 0 0 0 0 0 0 1);
> my @b=qw(0 0 0 0 0 0 0 0);
snip
> I would like to understand why $f does not have any value in th
Could you just create two arrays, @comp1 and @comp2 .
Then run a foreach loop for every char in the string and push @comp1,
@char_from_a, do the same for $b, and then foreach pop out the front see
whether they compare?
-Dan
On Fri, 2003-09-19 at 00:47, Jian Kang wrote:
> I got a problem of findi
Jian Kang wrote:
>
> I got a problem of finding the difference of two
> bit(binary) strings,
>
> eg:
> $a = "01";
> $b = "11";
>
> differs by: 1
>
> Is there a good way to solve this when $a and $b are
> very long, like:
> $a = "00111010011110010"
> $b = "1110110101011110010
On Sep 18, Jian Kang said:
>eg:
>$a = "01";
>$b = "11";
>
>differs by: 1
So why can't you use the ^ (xor) operator?
--
Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/
RPI Acacia brother #734 http://www.perlmonks.org/ http://www.cpan.org/
what does y/// stand fo
Hi
Your example is AND'ing the results of the two matches, so will return true
if both matches occur.
An example of comparing characters using the bitwise AND and the result
might help, or confuse you more thoroughly :)
hth
Rod
my $a = "a";
my $A = "A";
my $B = "B";
foreach ($A,$B,$a) {
On Sun, 2003-02-23 at 03:41, Beau E. Cox wrote:
> Hi -
>
> > -Original Message-
> > From: jdavis [mailto:[EMAIL PROTECTED]
> > Sent: Saturday, February 22, 2003 11:52 PM
> > To: perl
> > Subject: bitwise?
> >
> >
> > Hello,
> > Could someone explain what bitwise means? I am reading
> >
Hi -
> -Original Message-
> From: jdavis [mailto:[EMAIL PROTECTED]
> Sent: Saturday, February 22, 2003 11:52 PM
> To: perl
> Subject: bitwise?
>
>
> Hello,
> Could someone explain what bitwise means? I am reading
> up on Perl operators and I am seeing the term bitwise used for
> the &
10 matches
Mail list logo