On Jan 15, 7:39 am, telemac...@arpinum.org (Telemachus) wrote:
> On Wed Jan 14 2009 @ 8:17, dolphin_sonar wrote:
>
>
>
> > Hi,
>
> > I bought the O'Reilly 5th edition Learning Perl the other day and it's
> > great. I am new to programming and Perl as well. I do know my way
> > around Linux but I a
On Wed Jan 14 2009 @ 8:17, dolphin_sonar wrote:
> Hi,
>
> I bought the O'Reilly 5th edition Learning Perl the other day and it's
> great. I am new to programming and Perl as well. I do know my way
> around Linux but I am having problems upgrading from the version that
> was on my OS (Cent OS 5.2)
On 7/25/05, FreeFall <[EMAIL PROTECTED]> wrote:
> try:
> perl -ne '$line=$_;END{print $line}' yourfile
>
> On Mon, 25 Jul 2005 19:09:50 +0530
> [EMAIL PROTECTED] wrote:
>
> >
> > hi ,
> > I am a perl newbie.
> > Can someone suggest a perl command line snippet that will print the last n
>
try:
perl -ne '$line=$_;END{print $line}' yourfile
On Mon, 25 Jul 2005 19:09:50 +0530
[EMAIL PROTECTED] wrote:
>
> hi ,
> I am a perl newbie.
> Can someone suggest a perl command line snippet that will print the last n
> lines of a file.
>
> thanks in advance.
> regards,
> Kaushik
>
>
[EMAIL PROTECTED] wrote:
> hi ,
Hello,
> I am a perl newbie.
> Can someone suggest a perl command line snippet that will print the last n
> lines of a file.
perl -ne'INIT{$#x=shift()[EMAIL PROTECTED](splice(@x,1),$_)[EMAIL PROTECTED]' 4
yourfile
John
--
To unsubscribe, e-mail: [EM
Dave Adams wrote:
> Larsen,
>
Hi Dave. My name is Errin. Larsen is my surname.
Please, when posting replies, post to the list.
> I am afraid I cannot get your suggested code to work. Especially
> line that reads "foreach reverse 0..$n;"
>
> On 7/25/05, Larsen, Errin M HMMA/Information
On Jul 25, [EMAIL PROTECTED] said:
Can someone suggest a perl command line snippet that will print the last n
lines of a file.
The File::ReadBackwards module does it for you rather simply.
--
Jeff "japhy" Pinyan % How can we ever be the sold short or
RPI Acacia Brother #734 % th
[EMAIL PROTECTED] wrote:
hi ,
I am a perl newbie.
Can someone suggest a perl command line snippet that will print the last n
lines of a file.
Why do you want a Perl line for that?
You could just use 'tail' (assuming you run some kind of UNIX).
Matthias
--
To unsubscribe, e-mail: [E
Edward WIJAYA wrote:
> On Mon, 25 Jul 2005 21:39:50 +0800, <[EMAIL PROTECTED]> wrote:
>
>
>> Can someone suggest a perl command line snippet that will print the
>> last n
>> lines of a file.
>
>
> If you are under unix/linux
> just use "tail -n" command.
>
> However if you really want to go vi
hi ,
I am a perl newbie.
Can someone suggest a perl command line snippet that will print the last n
lines of a file.
thanks in advance.
regards,
Kaushik
Kaushik,
If you are on the command line I suggest the use of the tail command.
tail -n 123 filename
If you must perform this oper
On Mon, 25 Jul 2005 21:39:50 +0800, <[EMAIL PROTECTED]> wrote:
Can someone suggest a perl command line snippet that will print the last
n
lines of a file.
If you are under unix/linux
just use "tail -n" command.
However if you really want to go via Perl command line:
$perl -e '
open FH, "
> -Message d'origine-
> De : Perl Mail User [mailto:[EMAIL PROTECTED]
> Envoyé : mardi 18 mai 2004 20:10
> À : [EMAIL PROTECTED]
> Objet : Perl Newbie Question
>
> Hello All,
>
> I have a question, I am looking to read the name of the file that I am
> passing as an argument to the perl
On Tue, May 18, 2004 at 01:10:27PM -0500, Perl Mail User wrote:
> I have a question, I am looking to read the name of the file that I am
> passing as an argument to the perl script through the while (<>) part of
> the script.
$ARGV
perldoc perlvar
--
Paul Johnson - [EMAIL PROTECTED]
http://
Perl Mail User wrote:
> Hello All,
Hi. Providing a real name would be considered polite. Also, please choose a
meaningful subject.
>
> I have a question, I am looking to read the name of the file that I am
> passing as an argument to the perl script through the while (<>) part
> of
> the script
On May 18, 2004, at 1:10 PM, Perl Mail User wrote:
Hello All,
I have a question, I am looking to read the name of the file that I am
passing as an argument to the perl script through the while (<>) part
of
the script.
You're looking for the $ARGV variable. It contains the filename you
need.
Hop
I don't think you could be vaguer :)
Very basic
#!/usr/bin/perl
# update.pl multiple options command line
my @packages = @ARGV
foreach (@packages){
system(packageexecutableforupdate);
#with output captured
My $output = `packageexecutableforupdate`;
}
Not tested of cou
16 matches
Mail list logo