On Thu, 10 Jan 2008 13:47:41 -0900
Ken Irving [EMAIL PROTECTED] wrote:
On Wed, Jan 09, 2008 at 10:04:19PM -0500, ISHWAR RATTAN wrote:
Is there a way to place the last line read
when reading from a file? My suspicion is there
is no such thing but i do want to confirm..
Just another
On Jan 11, 4:20 am, s. keeling [EMAIL PROTECTED] wrote:
ISHWAR RATTAN [EMAIL PROTECTED]:
I am coming back toperlafter a long time.
The sample code these days also uses variable attribute my as:
my $inst = Extutils::Installed-new();
my @modules = $inst-modules();
Can any
On Jan 11, 4:20 am, s. keeling [EMAIL PROTECTED] wrote:
ISHWAR RATTAN [EMAIL PROTECTED]:
I am coming back to perl after a long time.
The sample code these days also uses variable attribute my as:
my $inst = Extutils::Installed-new();
my @modules = $inst-modules();
Can any
On Jan 10, 2008 1:23 PM, Chris Howie [EMAIL PROTECTED] wrote:
On Jan 10, 2008 1:11 PM, ISHWAR RATTAN [EMAIL PROTECTED] wrote:
I am coming back to perl after a long time.
The sample code these days also uses variable attribute my as:
my $inst = Extutils::Installed-new();
my
On Fri, Jan 11, 2008 at 01:51:44AM -0800, pedxing wrote:
But the point is that scope doesn't change in a loop, but it
does in a subroutine.
You are incorrect. Every set of { braces } is its own (sub)scope,
regardless of whether they are separated out into a sub or not.
~$ perl -w -e ' { my
On Jan 11, 2008 4:01 AM, pedxing [EMAIL PROTECTED] wrote:
#!/usr/bin/perl
# this just re-implements tail -1
#
# usage:
# /this/file /some/text/file.txt
#
my $last;
while( ) {
$last = $_;
}
print $last;
-
Now, try with the my $last;
pedxing [EMAIL PROTECTED]:
On Jan 11, 4:20 am, s. keeling [EMAIL PROTECTED] wrote:
-
#!/usr/bin/perl
# this just re-implements tail -1
#
# usage:
# /this/file /some/text/file.txt
I am coming back to perl after a long time.
The sample code these days also uses variable attribute my as:
my $inst = Extutils::Installed-new();
my @modules = $inst-modules();
Can any demistify 'my' for me??
-ishwar
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of
On Jan 10, 2008 1:11 PM, ISHWAR RATTAN [EMAIL PROTECTED] wrote:
I am coming back to perl after a long time.
The sample code these days also uses variable attribute my as:
my $inst = Extutils::Installed-new();
my @modules = $inst-modules();
Can any demistify 'my' for me??
-ishwar
ISHWAR RATTAN escreveu:
I am coming back to perl after a long time.
The sample code these days also uses variable attribute my as:
my $inst = Extutils::Installed-new();
my @modules = $inst-modules();
Can any demistify 'my' for me??
http://perldoc.perl.org/functions/my.html
--
Dave Sherohman [EMAIL PROTECTED] writes:
On Wed, Jan 09, 2008 at 09:45:15PM -0800, Sam wrote:
if i read you correctly, you can read the file into an array and use pop,
which will return the last element read.Or you could use @array[-1]
That's rather wasteful of memory, which becomes a
On Wed, Jan 09, 2008 at 10:04:19PM -0500, ISHWAR RATTAN wrote:
Is there a way to place the last line read
when reading from a file? My suspicion is there
is no such thing but i do want to confirm..
Just another guess at what you're asking about; perhaps the word
placed was intended to be
ISHWAR RATTAN [EMAIL PROTECTED]:
I am coming back to perl after a long time.
The sample code these days also uses variable attribute my as:
my $inst = Extutils::Installed-new();
my @modules = $inst-modules();
Can any demistify 'my' for me??
Is there a way to place the last line read
when reading from a file? My suspicion is there
is no such thing but i do want to confirm..
-ishwar
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
On Jan 9, 2008 10:04 PM, ISHWAR RATTAN [EMAIL PROTECTED] wrote:
Is there a way to place the last line read
when reading from a file? My suspicion is there
is no such thing but i do want to confirm..
What do you mean by place?
--
Chris Howie
http://www.chrishowie.com
if i read you correctly, you can read the file into an array and use pop,
which will return the last element read.Or you could use @array[-1]
On 1/9/08, Chris Howie [EMAIL PROTECTED] wrote:
On Jan 9, 2008 10:04 PM, ISHWAR RATTAN [EMAIL PROTECTED] wrote:
Is there a way to place the last
On Wed, Jan 09, 2008 at 09:45:15PM -0800, Sam wrote:
if i read you correctly, you can read the file into an array and use pop,
which will return the last element read.Or you could use @array[-1]
That's rather wasteful of memory, which becomes a concern with larger
files. If the objective is
17 matches
Mail list logo