[vienna.pm] Ueberpruefen auf leerzeile

Toni Andjelkovic toni at devnull.at
Sun May 28 05:19:24 CDT 2000


* * * vienna-pm-list * * *


Peter Seitz jun. wrote on Sun, May 28 2000 (11:11:11 +0200):
> wie ueberpruefe ich in perl eigentlich, ob ich eine Leerzeile 
> vorliegen hab?

nimm die regex '^$', z. b.

next if /^$/;                 # skip empty lines
while(<>) {
    if($_ =~ m/^$/) { next; } # does the same
}

cu,
-- 
Toni Andjelkovic
toni at devnull.at

###
You are subscribed to vienna-pm-list as Toni Andjelkovic <toni at devnull.at>
http://www.fff.at/fff/vienna.pm/



More information about the Vienna-pm mailing list