in reply to Re: RFC: Proposed tutorial - simple login script using CGI::Application
in thread RFC: Proposed tutorial - simple login script using CGI::Application

Eric256,

My intent, for those who actually want to run the script, was for you to download the files, then run the provided perl one-liner to strip the numbers out. For example, you could download Simple.pm, then run this:

perl -p -i.orig -e 's/^=\s+\d+\s+= //' Simple.pm

And you'll have a working copy of Simple.pm (no line numbers) and a backup called Simple.pm.orig (line numbers included) that you can use to follow along with the tutorial.

I'm guessing your editor numbers each file starting at line 1. This makes perfect sense, but if I numbered the listings that way it would get confusing because of the overlap (i.e., 7 listings => 7 line number 1's, etc.). I concatenated all the files together, then ran a script to prepend the numbers, so that each line would have a unique identifier.

But I'm open to suggestions - if there's a better way to do it, I'm willing to give it a try. I'll wait a few days and see what other people suggest/recommend.

Thanks for the feedback.

  • Comment on Re^2: RFC: Proposed tutorial - simple login script using CGI::Application

Replies are listed 'Best First'.
Re^3: RFC: Proposed tutorial - simple login script using CGI::Application
by eric256 (Parson) on Jun 20, 2007 at 00:04 UTC

    For the line numbers you could do Simple.pm:10-15 or something like that. I for one would find that much less confusing. Plus once i've downloaded and stripped the line numbers to actualy use it, your directions are now useless because they no longer match the line numbers.


    ___________
    Eric Hodges
Re^3: RFC: Proposed tutorial - simple login script using CGI::Application
by jdporter (Paladin) on Dec 14, 2011 at 20:20 UTC
    ...download the files, then ... strip the numbers out

    Please don't. That is really inconvenient for your readers/users. PerlMonks supports adding line numbers automatically to code blocks. You can turn it on for yourself while you're writing your post; turn it off again later if you don't want it. As it stands, I'm not at all inclined to download your code.

    I reckon we are the only monastery ever to have a dungeon stuffed with 16,000 zombies.