what is output of print abs("123abc") ?
B
Correct answer
Explanation
The abs() function returns the absolute value of a number. When given '123abc', Perl converts it to numeric context which takes 123 (stopping at non-numeric 'abc'), then returns abs(123) = 123. It doesn't return 0 or ignore the numeric part. This demonstrates Perl's automatic number-to-string conversion.