in reply to Re: Developing code to be a module
in thread Developing code to be a module
Lots of folks write programs that don't have functions, programs that don't start from a template
#!/usr/bin/perl -- use strict; use warnings; Main( @ARGV ); exit( 0 ); ...
This is typical for short programs and one-offs
And you can't beat perl lanse :)
$ echo hi there | perl -lanse " print qq{$greet\t$F[1]}" -- -greet=by +e bye there $ echo hi there > stuff $ perl -lanse " print qq{$greet\t$F[1]}" -- -greet=bye stuff bye there
These types of programs can live and do good work quite for a long time before they need a second look, or functions/modules/tests...
Code doesn't need to go places :)
In Section
Seekers of Perl Wisdom