Win <-> Lin
Stanislav Zahariev
sofit at proshe.bg
Thu Apr 1 07:00:34 CST 2004
sofia-pm-list - An official of Sofia's Perl hackers
Stanislav Zahariev <sofit at proshe.bg>
Zdrawej anio,
awbc> tie @smtp_settings, 'Tie::File', $smtp_file;
awbc> for (@smtp_settings) {
awbc> chomp;
awbc> next if /^#/;
awbc> next if /^$/;
awbc> if (/^(\w+)\s=\s'(\S+)'/) {
awbc> $smtp_host = $2 if ($1 eq 'SMTPHost');
awbc> $recipient = $2 if ($1 eq 'Recipient');
awbc> $reverse_path = $2 if ($1 eq 'Reverse');
awbc> }
awbc> }
4udel li si se dali ima izobsto nqkakwa razlika mejdu \cM\n i \n (kojto
opredelq kraq na redowete pri Windows i syotwetno linux) za tozi
regulqren izraz? Sys sigurnost nqma da se spre pri next-owete. Bi
moglo da ne successne pri if (/^(\w+)\s=\s'(\S+)'/) {, no i tam ste
mine... Tej kato samoto '(\S+)' wyobste ne wliqe kakwo ima sled '-ta,
dali ste e \n ili \r\n . Ne znam dali sym praw, no...
P.S. Predlagam ti da prawish pone ^\s*(\w+)\s*=\s*'(\S+)'/, no pomisli
dali towa ti pozwolqwa da prawish sth = 'Hello dude, what\'s up?' i
dali go iskash...
--
Best regards,
Stanislav
More information about the Sofia-pm
mailing list