[kw-pm] the problem with code copyrights

Robert P. J. Day rpjday at mindspring.com
Sun Oct 26 07:24:26 CST 2003

  as i was perusing a site that described a number of scripts to restore a
machine from the bare metal, i noticed in one of the scripts the inclusion
of a script taken from the perl cookbook, "cut2fmt". this routine is
called with something like:

 $fmt = $cutfmt(11, 19, 24, 34, 45, 49) ;

and the routine itself is:

sub cut2fmt {
    my (@positions) = @_;
    my $template    = '';
    my $lastpos     = 1;

    foreach $place (@positions) {
	$template .= "A" . ($place - $lastpos) . " ";
	$lastpos = $place;

    $template .= "A*";
    return $template;

  i have to ask -- is there anything particularly novel or innovative
about this chunk of code that justifies a *copyright*?   so it builds
a template string given an array of positions.  so what?  it's kind
of galling to find this kind of protection in a book from o'reilly,
who's supposed to be on the side of good and openness and that sort
of thing.

  how much sillier can this get?


More information about the kw-pm mailing list