Help for this page

Select Code to Download


  1. or download this
    my $text = 'hello
       this is a multiline
    ...
    $text =~ s/([^\S\n]+|\n)/$1 eq "\n" ?
                             print "New line\n" :
                             print "Whitespaces\n"; $1/gemi;
    
  2. or download this
    New line
    Whitespaces
    ...
    Whitespaces
    New line
    Whitespaces