Guest User

Untitled

a guest
Jun 23rd, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. $val = chr(someFunction());
  2.  
  3. if($val == " ")
  4. {
  5. #do something
  6.  
  7. }
  8. elsif($val == 0)
  9. {
  10. #do something else
  11. }
  12.  
  13. if ($val eq " ") ...
  14.  
  15. if (looks_like_a_number($val) and $val == 0) {
  16. #do something
  17. }
  18.  
  19. if ($val eq 0) {
  20. #do something
  21. }
  22.  
  23. if ($val ~~ 0) {
  24. #do something
  25. }
  26.  
  27. use strict;
  28. use warnings;
  29.  
  30. my $val = chr(someFunction());
  31.  
  32. if($val == " ")
  33. {
  34. #do something
  35.  
  36. }
  37. elsif($val == 0)
  38. {
  39. #do something else
  40. }
  41.  
  42. sub someFunction {
  43. return 1;
  44. }
  45.  
  46. (W numeric) The indicated string was fed as an argument to an operator
  47. that expected a numeric value instead. If you're fortunate the message
  48. will identify which operator was so unfortunate.
Add Comment
Please, Sign In to add comment