Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 16th, 2012  |  syntax: None  |  size: 0.23 KB  |  hits: 16  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. substitution in string
  2. my $t =~ s/^.///;
  3.        
  4. my $t =~ s|^./||;
  5.        
  6. s/^.///;
  7.        
  8. s|^./||;
  9.        
  10. $t=q(./test);$t=~s{^./}{};print $t;
  11.        
  12. my $t = './test';
  13. $t =~ s{./}{};
  14.        
  15. use Path::Class qw( file );
  16. say file("./test")->cleanup();