Hello, I'm new here and let me apologize for any inconvenience regarding this post.
so, my question is that I'm trying to make a script that reads 2 arguments and returns result of bit-wise operation AND.
#!/usr/bin/perl use strict; use warning; my $arg00=shift ( @ARGV ); my $arg01=shift ( @ARGV ); #printf $arg00+$arg01."\n"; printf sprintf( $arg00&$arg01 )."\n";
when I run test.pl 33 224, it returns result as 22.
if I run printf sprintf( 33&224 )."\n"; it returns 32.
also if I comment out the # before the printf, it also returns 32.
could any one give me an advice about this difference?
regards,
toro
In reply to bit-wise operation by toro_the_third
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |