Ywo comments. First, I'd guess that there's way too much code here.
I'd be surprised it half of it couldn't be eliminated.
I may post a followup on this later.
Second, I don't think this part could possibly work:
35: my @disk = <FILE>;
36: chomp @disk = <FILE>;
since
@disk will always be empty.
Perhaps you want
chomp(my @disk = <FILE>) instead.
Update: Well, I was wrong about lines 35-36
not possibly working! It turns out that line 36 is parsed
so that the result of
<FILE> is assigned
to
chomp, rather than to
@disk!
(That is, it is parsed as
chomp(@disk) = <FILE>, not
chomp(@disk = <FILE>).) In any event, the second
assignment is useless, and the two lines should be replaced with
one:
chomp(my @disk = <FILE>);
In other news, I was right about there being too much code.
I've cut
copy_from_root from 98 lines to 26, and
I'm about to move on to the rest of the program.
--
Mark Dominus
Perl Paraphernalia
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.