script perl with sed command

Giorgos Keramidas keramida at ceid.upatras.gr
Sun Apr 8 17:58:05 UTC 2007


On 2007-04-08 00:26, Garrett Cooper <youshi10 at u.washington.edu> wrote:
> Giorgos Keramidas wrote:
> > Try using Perl only, instead of forking sed(1), like this:
> > [...]
> > | sub supfile_set_default_host($$);
> > | sub supfile_set_default_host($$)
> > | {
[...]
> Interesting. Is that old perl syntax (v4, etc)? Just curious because
> most of the documentation and examples switched to:
>
> sub supfile_set_default_host
> {
>
> syntax as opposed to:
>
> sub supfile_set_default_host($$);
>
> sub supfile_set_default_host($$);
> {

That's actually a function prototype.  Prototypes are explained in:

    man perlsub

in far more detail than I could ever describe in an email message :)

HTH,
Giorgos



More information about the freebsd-questions mailing list