home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!cs.utexas.edu!zaphod.mps.ohio-state.edu!swrinde!mips!odin!fido!fido!rickb
- From: rickb@farfle.farfle.asd.sgi.com (Rick Braumoeller)
- Newsgroups: comp.lang.perl
- Subject: write/format bug
- Message-ID: <RICKB.92Aug12173851@farfle.farfle.asd.sgi.com>
- Date: 13 Aug 92 01:38:51 GMT
- Sender: news@fido.asd.sgi.com (Usenet News Admin)
- Distribution: comp
- Organization: Silicon Graphics, Inc.
- Lines: 40
-
- A Perl script that I use goes into several directories and
- collects information about the files in them. It then summarizes
- using "write". Sometimes the information can be multi-lined,
- so I'd like to get output like this:
-
- Directory | Comments
- -----------+----------------------------------
- dir1 | This and that
- foo | A longer comment, that spans two
- | lines
-
- For this, I am using the following format:
-
- format STDOUT =
- @<<<<<<<<< | ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
- $dir, $results{$dir}
- ~~ | ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
- $results{$dir}
- .
-
- However, when I run with this format, Perl goes into some kind
- of infinite loop when I do the first 'write' - slowly
- consuming memory. If I get rid of the | from the continuation
- line, like this,
-
- format STDOUT =
- @<<<<<<<<< | ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
- $dir, $results{$dir}
- ~~ ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
- $results{$dir}
- .
-
- everything works fine, but my output isn't as nice.
-
- Have I stumbled on something? If you can't reproduce this
- behavior, I'll gladly forward my script to you.
-
- Insight greatly appreciated...
-
- (BTW, using Patch level: 35)
-