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 :)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Developing code to be a module (perl -lanse)
by space_monk (Chaplain) on May 01, 2013 at 07:48 UTC | |
by Anonymous Monk on May 01, 2013 at 08:11 UTC | |
by space_monk (Chaplain) on May 01, 2013 at 08:39 UTC | |
by Anonymous Monk on May 01, 2013 at 09:08 UTC | |
by space_monk (Chaplain) on May 01, 2013 at 16:51 UTC | |
|