Noah wrote:
Hi there,
Hello,
I am trying to get two conditions matched
how can I get if ( ($source_location eq $destination_location ) && (
$source_device < $destination_device ) ) {
That should be:
if ( $source_location eq $destination_location && $source_device lt
$destination_device ) {
and
if ( ($source_location eq $destination_location ) && ( $source_device >
$destination_device ) ) {
if ( $source_location eq $destination_location && $source_device gt
$destination_device ) {
how do I use the cmp command here since $source_device and
$destination_device are strings.
I don't see how using cmp would help. cmp is a binary operator just
like eq, ne, gt, lt, ge and le.
like bar1 should be less than bar2
and so on
how do I compare using cmp
$string1 cmp $string2
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-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/