> "Paul" == Paul Johnson <[EMAIL PROTECTED]> writes:
Paul> On Wed, Mar 02, 2005 at 05:22:14AM -0800, Randal L. Schwartz wrote:
>> From emacs:
>> step 1 - highlight Perl code as region
>> step 2 - ^U ESC ! expand | perl -pi 's/^/\t=$.=\t/' CR
>>
>> It's programmed into my fingers. :)
Paul> Th
On Wed, Mar 02, 2005 at 05:22:14AM -0800, Randal L. Schwartz wrote:
> From emacs:
> step 1 - highlight Perl code as region
> step 2 - ^U ESC ! expand | perl -pi 's/^/\t=$.=\t/' CR
>
> It's programmed into my fingers. :)
Then you hit undo and try again without the typo?
--
Paul Johnson - [EMAIL
>> "Gavin" == Gavin Henry <[EMAIL PROTECTED]> writes:
>
>>> perl -pe 's/^/=$.= /' test.pl
>
> Gavin> That looks familiar
>
> Yup.
>
> From emacs:
> step 1 - highlight Perl code as region
> step 2 - ^U ESC ! expand | perl -pi 's/^/\t=$.=\t/' CR
>
> It's programmed into my fingers. :)
I knew yo
Thus spaketh To beginners@perl.org:
> Thus spaketh Randal L. Schwartz:
> > > "Gavin" == Gavin Henry <[EMAIL PROTECTED]> writes:
> >
> > >> perl -pe 's/^/=$.= /' test.pl
> >
> > Gavin> That looks familiar
> [ ... ]
Sorry.
> Yes. But I found a way to confuse myself.
>
> Why does
>
> perl -p
Thus spaketh Randal L. Schwartz:
> > "Gavin" == Gavin Henry <[EMAIL PROTECTED]> writes:
>
> >> perl -pe 's/^/=$.= /' test.pl
>
> Gavin> That looks familiar
[ ... ]
Yes. But I found a way to confuse myself.
Why does
perl -e '$_.="$. "' some_file
start the enumaration at line 2, while
perl
> "Gavin" == Gavin Henry <[EMAIL PROTECTED]> writes:
>> perl -pe 's/^/=$.= /' test.pl
Gavin> That looks familiar
Yup.
>From emacs:
step 1 - highlight Perl code as region
step 2 - ^U ESC ! expand | perl -pi 's/^/\t=$.=\t/' CR
It's programmed into my fingers. :)
--
Randal L. Schwartz - Sto
--
Just getting into the best language ever...
Fancy a [EMAIL PROTECTED] Just ask!!!
> On Tue, Mar 01, 2005 at 08:51:58AM -0500, Wiggins d'Anconia wrote:
>
>>and I figure you can remove the assignment in the
>> below, but I am not sure how
>>
>> perl -p -e '$_ = "=$.
On Tue, Mar 01, 2005 at 08:51:58AM -0500, Wiggins d'Anconia wrote:
>and I figure you can remove the assignment in the
> below, but I am not sure how
>
> perl -p -e '$_ = "=$.= $_"' test.pl
Here's one way.
perl -pe 's/^/=$.= /' test.pl
--
Paul Johnson - [EMAIL PR
Please bottom post...
Manav Mathur wrote:
This??
perl -i.bak -ne 'print "=$.= $_"' /path/to/code_file
Manav
I am no golfer, but you don't need the -i and .bak if you are not
editing the file, and I suspect this will make things slower because
Perl has to keep track of whether you are editing. Yo
This??
perl -i.bak -ne 'print "=$.= $_"' /path/to/code_file
Manav
-Original Message-
From: Gavin Henry [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 01, 2005 5:44 PM
To: beginners@perl.org
Subject: Re: code on stonehenge.com for adding line numbers to code
&g
> is this what you are looking for?
> $count=1;
> while() {
> print OUTFILE "=$count++= $_";
> }
It was more like perl -pi -e blah
>
> On Tue, 1 Mar 2005 11:23:44 - (GMT), Gavin Henry <[EMAIL PROTECTED]>
> wrote:
>> Dear all,
>>
>> I remember reading how Randal puts the =1= =2= in front of
Dear all,
I remember reading how Randal puts the =1= =2= in front of each line of
code on his site, but I can't find it again.
Anyone remember?
Thanks.
--
Just getting into the best language ever...
Fancy a [EMAIL PROTECTED] Just ask!!!
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For addit
12 matches
Mail list logo