Help for this page

Select Code to Download


  1. or download this
    use warnings;
    use strict;
    ...
    8699
    9800
    96
    
  2. or download this
    my $_sensor_type =  'I2600*&^_A8699()^%#@C9800&*%A96';
    my $type = ($_sensor_type =~ /[a-z]+([0-9]+)/i)[0];
    ...
    #so what happens if the match and consequent slice fails?
    $type ||= "some default";
    #or check for undef