Problems? Is your data what you think it is? | |
PerlMonks |
Re^2: wgetas - download many small files by HTTP, saving to filename of your choiceby ambrus (Abbot) |
on Oct 22, 2011 at 22:06 UTC ( [id://933109]=note: print w/replies, xml ) | Need Help?? |
You could do that if you want to. I just thought I might possibly want to add extra fields to the file format later. But yes, I'm aware of this trick. I'm storing my collection of (public) bookmarks in a text file where each line has the URL as the last whitespace-separated field, and generating HTML pages automatically uploaded to my homepage from them. For example, a part of this source file looks like this. (First word is the level, as this is organized to a hierarchy; the URL null: is used for a heading that's not a link.)
This is then translated to some HTML that looks like this when rendered (I'm not pasting the HTML source here as it's a bit hard to read):
So anyway, here I'm using the fact that the URL is always exactly the last word. If the last word of a line doesn't look like an URL, the rendering script gives me a warning.
In Section
Cool Uses for Perl
|
|