Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Re: Re: Using perl to teach programming

by ichimunki (Priest)
on Jan 31, 2001 at 20:35 UTC ( [id://55486]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Using perl to teach programming
in thread Using perl to teach programming

You could store the script lines in a list instead of a single scalar, then using (ack!) line numbers, provide a way to list, modify, add (remember BASIC?), or delete lines. This way a tutorial can build up a routine. Then at the end, you can save the whole thing as a real Perl ".pl" script in an external file.
  • Comment on Re: Re: Re: Using perl to teach programming

Replies are listed 'Best First'.
Does this remind you of BASIC or what?
by orkysoft (Friar) on Feb 02, 2001 at 04:19 UTC

    Yeah, add a LIST command, which will show all those lines, possibly preceded by line number (and automatic renumbering), so you'll be able to fit lines in between them:

    >LIST 10 while($home) { 20 sweet } >15 # Okay, a ++ vote for the first monk to recognise which tv series +I'm referring to :-) >LIST 10 while($home) { 20 # Okay, a ++ vote for the first monk to recognise which tv series I +'m referring to :-) 30 sweet }

    Problem is, BASIC has a bad reputation, but this 'instant gratification' 'mod for Perl' might be very promising. I'll try to test it on my brother tomorrow :-)

Re: Re: Re: Re: Using perl to teach programming
by stefan k (Curate) on Jan 31, 2001 at 21:00 UTC
    This sounds reasonable. The abiliry to create 'real' working little scripts is simply a good way of 'getting a feeling' for things. If the beginner would see some nicely formatted and correctly indented code, it would it could well improve his or her understanding. You could even go one step further and use the line numbers to output listings like we find in magazines. Maybe even HTML(orwhatever)-style. OK, you're probably right that this would mean a lot of effort ;-)

    The list-storing-method would mean command-history, too (or did you think of theat already ichimunki?)

    Regards
    Stefan K

    $dom = "skamphausen.de"; ## May The Open Source Be With You! $Mail = "mail@$dom; $Url = "http://www.$dom";

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://55486]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (3)
As of 2024-04-26 00:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found