[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [texlive-new] Creating rules file from a single template



On Friday 22 December 2006 01:21, Norbert Preining wrote:
> If someone can help:
> in tpm2debcommon.pm:
> 	sub myopen() {
> 		my ($fd,$fn) = @_;
> 		open($fd,$fn) or die("vaf...\n");
> 	}
> but this doesn't work if I do in tpm2deb-source.pl:
> 	myopen(FOO,"<blaa");
> because reading gives nothing. Some error with -w. Damned.
> Thats the reason why the -source script does not work, it produces
> completely empty stuff

"sub myopen {" and "sub myopen($$) {" are both valid but
"sub myopen() {" declares a sub with zero args.

You can use "perl -e" to experiment, e.g.:

$ perl -e 'sub myopen($$) { my ($fd,$fn) = @_;  open($fd,$fn) or 
die("foo\n"); } myopen(FOO,"</etc/passwd"); while(!eof(FOO)) { print 
<FOO>; };'

--Mike Bird



Reply to: