From: Peter Daum <gator...@yahoo.de> > I occasionally have to write Perl scripts that should behave the same on > Unix- and DOS-like Systems. One little problem I encounter there is: > > For quick hacks, the "while(<>)" mechanism is very handy, because it > saves a lot of typing. On Unix, I can call a script as a filter, with > filenames or with glob-Patterns without having to worry about the > details - in any case I can just use <> to read the data. On DOS (and > its descendants), this used to be the same - I still have an old binary > of Perl 5.005 lying around, where Perl silently takes over the glob > expansion that on Unix would be done by the shell. Unfortunately, this > obviously is not the case anymore: With more recent Perl versions, when > a script is called with '*.xyz' it will just try to open '*.xyz' and > fail. > > The only workaround I know is to do something like: > > ... <snipped>
You might like http://jenda.krynicky.cz/#G Jenda ===== je...@krynicky.cz === http://Jenda.Krynicky.cz ===== When it comes to wine, women and song, wizards are allowed to get drunk and croon as much as they like. -- Terry Pratchett in Sourcery -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/