On Sun Jul 06 2008 @ 8:09, loody wrote:
> Dear all:
> I try to read the last line of a file directly instead of using
> while(<>) or something else to read each line until "undef" bumped to
> me.
> If you know some build-in functions or another modules for me to use,
> please help me.
My first th
On Sun Jul 06 2008 @ 5:58, loody wrote:
> BTW, do you know where I can find the whole list after substitution
> and pattern matching, m/,?
Check out these three parts of the documentation:
perldoc perlrequick
perldoc perlretut
perldoc perlre
That goes in increasing order of complexity, detail,
Maybe a better title is "A question about the comments on one of the answers
to an exercise." Anyhow, this seems like a reasonable place to ask. I just
finished doing the exercises for chapter 4 in the Llama book (on
subroutines) and for question 3, I produced this for a subroutine to collect
numbe
On 10/25/07, Chas. Owens <[EMAIL PROTECTED]> wrote:
>
> From the sound of it what you want is in-place-editing:
>
> #!/usr/bin/perl -i
>
> use strict;
> use warnings;
>
> while (<>) {
> s/this/that/
> }
>
> The code above will read in any number of files modifying "this" to
> "that" in each on
Hi,
I have read around and cannot seem to find an answer to this, and it's
driving me a bit nuts. I have a small script that I am trying to use to list
the items in a directory and the size of the items. The script works
perfectly if I run it in the directory itself, but if the script is
somewhere