Map function with regular expression : map « System Functions « Perl






Map function with regular expression

    

@a = qw(This is a test);
@b = map/^(\w{4})/, @a;
print "@b";

   
    
    
    
  

Related examples in the same category

1.Using Map function