in reply to Re: Perl What for?
in thread Perl What for?

Why all the effort? perl -wde1 and then just play on the prompt. :-) It also lacks the scoping problems Django mentioned.

Makeshifts last the longest.

Replies are listed 'Best First'.
Re: Re^2: Perl What for?
by Django (Pilgrim) on Sep 08, 2002 at 13:12 UTC

    Maybe this is a matter of taste, but I think the Perl debugger might be confusing for the newbie. It has its own commands and doesn't execute programs the way they would normally run. Learning one thing after another, not all simultaneously is very important. I'd start with the most essential features and move on to the "specials" later. But as always, TMWTDI -- so check it out.

    ~Django
    "Why don't we ever challenge the spherical earth theory?"

      It is quite confusing to actually try to debug with it if don't know heads from tails yet, true. The command I posted uses -e1 to supply a null source so you can just enter Perl code on the commandline though, and it'll pretty much work like an interactive interpreter then.

      Makeshifts last the longest.

Re: Re^2: Perl What for?
by BrowserUk (Patriarch) on Sep 08, 2002 at 16:36 UTC

    C:\>perl -wde1 Default die handler restored. Loading DB routines from perl5db.pl version 1.07 Editor support available. Enter h or `h h' for help, or `perldoc perldebug' for more help. main::(-e:1): 1 DB<1>

    "Ah! Help!"

    DB<1>h T Stack trace. s [expr] Single step [in expr]. n [expr] Next, steps over subroutine calls [in expr]. <CR> Repeat last n or s command. r Return from current subroutine. c [line|sub] Continue; optionally inserts a one-time-only breakpoin +t at the specified position. l min+incr List incr+1 lines starting at min. l min-max List lines min through max. l line List single line. l subname List first window of lines from subroutine. l $var List first window of lines from subroutine referenced +by $var. l List next window of lines. - List previous window of lines. w [line] List window around line. . Return to the executed line.

    "Um!"

      As I already replied to Django: he doesn't need any of those (besides maybe q).. just type Perl code at the command prompt.

      Makeshifts last the longest.