Venkateswarlu Bulusu wrote:
>
> hi
Hello,
> i was trying to do negation (~) on a string and i was getting strange result.
~ is a numerical operator, not a string operator.
> #!/usr/bin/perl
> use warnings;
> $a = "venkat";
> $b = ~ $a;
> print $a, "\n";
> print $b, "\n";
>
> when i run this
hi
i was trying to do negation (~) on a string and i was getting strange result.
#!/usr/bin/perl
use warnings;
$a = "venkat";
$b = ~ $a;
print $a, "\n";
print $b, "\n";
when i run this i am getting blank for $b, and getting
1;2c on the command prompt. when i changed $a from venkat to abcdef not