in reply to Problem with deleting the first n characters on a line
See perlop for more about substitution and perlre for more on regular expressions. Also, it doesn't look like you are using strict. Strict forces you to used good coding practices and helps you catch a lot of coding errors. Always, always put "use strict" shortly after the shebang line.$first_line =~ s/^gpu//; print FOUND $first_line;
Update: If you just want to get rid of the first 3 arbitrary characters, use s/^.{3}//;
|
|---|