Escape sequences, \n and \t : Escape « Regular Expression « Perl






Escape sequences, \n and \t

    

while(<DATA>){
    print if s/\n/\t/;
}
__DATA__
    AA AA AQA 101

   
    
    
    
  








Related examples in the same category

1.A word-count program that handles multiple spaces and tabs between words.
2.Escape Sequences for Special Characters
3.Match the new line character
4.Match multiline patterns?
5.Skip blank lines and comments
6.Multiplies every integer in a file by 2