At 11:21 PM 5/20/02 -0700, drieux wrote: >b) I'm not sure I would use it in demonstration code where >I am trying to help someone make the cross over from shell >scripting to perl - since writing transparently readable >code that has variables called out that say mostly what >they are about - or takes a 'twist' or 'pun' on their use - >I feel may help most folks over the hump of the camel. > >{ there is the struggle to teach both the syntax and semantics >of perl - as well as the underlying issues of software development >as a psychosis - which are at times almost mutually exclusive ... >Too many 'neato/cool' things that 'can be done' can get in the >way - since there is a need to help folks understand what coding >is all about.... } > >c) I of course would avoid that in 'production code' on the >grounds that I would be going through Getopts::Long - so >that all of that is nicely returned to me in a pretty hash >and can be cleanly sucked out as I expect it.
Well, YMMV. The point of <> is that it easily duplicates the interface most commonly provided by Unix text utilities (sed, grep, cat, etc). So the user can provide the same kind of interface to a Perl program by actually writing *less* code than they would to do it another way. And you don't need to explain the interface to anyone that's used those utilities and understands the common interface. Now, I'm not big on Getopt::Long, but I do make extensive use of Getopt::Std, and <> plays very well with it. If the semantics of <> work for you, then it can certainly fulfil definitions of 'production ready'. This is somewhat religious, of course, and I'm not invalidating your approach, just exposing beginners to a different point of view. -- Peter Scott Pacific Systems Design Technologies Boston Perl Classes in July: http://www.perldebugged.com/ http://stemsystems.com/class/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]