[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: end marker
From: |
rm |
Subject: |
Re: end marker |
Date: |
Wed, 11 Feb 2004 22:15:05 +0100 |
User-agent: |
Mutt/1.5.3i |
On Wed, Feb 11, 2004 at 08:53:38PM +0100, Andreas Rottmann wrote:
> Brian S McQueen <address@hidden> writes:
>
> > Is there an equivalent to perls "__END__" for scheme scripting? It is very
> > handy for developing scripts.
> >
> I assume (quit) will do the job in most cases (I don't really know the
> semantics of __END__, just guessing).
Well, __END__ does have some nice/strange/ugly/perlish semantic ;-)
The parser stops reading at '\n__END__' but leaves the filehandle open.
The script itself can then continue reading from this filehandle.
*---------------------------------------------------------------------
| #!/usr/barf/perl
|
| while (<DATA>)
| {
| print "Data from myself: $_";
| }
|
| __END__
|
| This is
| data for the script
|
*---------------------------------------------------------------------
This can come handy for selfcontained scripts.
Ralf Mattes
> Andy
> --
> Andreas Rottmann | address@hidden | address@hidden |
> address@hidden
> http://yi.org/rotty | GnuPG Key: http://yi.org/rotty/gpg.asc
> Fingerprint | DFB4 4EB4 78A4 5EEE 6219 F228 F92F CFC5 01FD 5B62
>
> Packages should build-depend on what they should build-depend.
>
>
> _______________________________________________
> Guile-user mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/guile-user