Help for this page

Select Code to Download


  1. or download this
    my $dev = "c10t2d1";
    
    my($c,$t,$d) = $dev =~ m/\d+/g;
    print "$c  $t  $d";
    #prints: 10  2  1
    
  2. or download this
    my $test = "10 1/0/6/0/0.1.20.0.0.2.1   c10t2d1   FA  ";
    my ($ctd) = $test =~ m/(\w+)\s+FA\s*$/;
    print $ctd;
    #prints: c10t2d1