Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

RE: Multiple file reading

by BigJoe (Curate)
on Jul 27, 2000 at 01:20 UTC ( [id://24580]=note: print w/replies, xml ) Need Help??


in reply to Multiple file reading

Sounds like you want to do a binary combine. If this is the case try using "xor, or, and" operators. Like this
my $a = 10101010 my $b = 10000000 my $XorComb = $a xor $b my $orComb = $a or $b my $AndComb = $a and $b


I have never done this with perl (only in Assembly & C) I think you may have to either declare the varibles as binary or make do the compares in binary.

--BigJoe

Update use the operators ar0n said "For binary operations use &, | and ^." instead."

Replies are listed 'Best First'.
RE: RE: Multiple file reading
by ar0n (Priest) on Jul 27, 2000 at 01:40 UTC
    The operators 'and', 'or', and 'xor' are logical operators.
    They will not work in this context (at least not the way
    you want them to).

    They are equal to &&, || and (!$a != !$b), respectively.

    For binary operations use &, | and ^.

    -- ar0n

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://24580]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (6)
As of 2024-04-20 02:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found