Hewlett,
If you are on a *nix system try:
a2ps -E -g -n script.pl
This will print line numbers two pages per page with highlight formatting.
Very nice.
--
Regards,
Jim Millard
Sr. Software Engineer
Pioneer Digital Technologies, Inc.
==
I think they use
Read the error carefully, it may have been giving you a line number in the
Time::Local module in your script, and it will tell you that. Often you
will get the line in the module that had the error as well as the line
number in your script that called the subroutine in the module.
As for tracki
Gary Hawkins wrote:
> navigation is slow, etc. There is probably a Windows port of vi,
> but I prefer Notepad.
Get yourself a copy of syn from:
http://www.webattack.com/get/syn.shtml
Extract from the About:
This Program is a Fileeditor with Syntaxhighlight support for over 30
different Language
> On Fri, 11 Jan 2002, Hanson, Robert wrote:
> > Hashes are slower than arrays, but I don't
> > usually worry about those things unless
> > performance is an issue. I recommend (others
> > will no doubt have different opinions) that
> > you use a hash when it makes your life easier...
> > in this
> Any site that provides details on the different
> command line switches?
You mean like www.perldoc.com?
Also, try:
perl -h
Jonathan Paton
__
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Char
In article <000701c19bba$0af78320$1f58a9cb@S7575530>, Leon wrote:
> {
> my $count = 0;
> open FILE, 'perl_script.pl' or die "$!\n";
> while (){
> $count++;
> print "Line $count: $_";
> };
> close FILE;
> };
You could even do that in a one-liner:
$ perl -pe'printf("%03i : ", $.)'
Seems a good example of how every little question has some merit. You just
never know.
I've had the same problem on Windows 2000 and have been using edit.com to find
line numbers in my scripts, and it isn't real handy; it opens a small window,
navigation is slow, etc. There is probably a Window
Sanilkumar wrote:
>
> Enyone can help me:
>
> how to do Quicksort , selection sort ,mergesort and
> external merge sort in perl that programes are exactly the same way that
> programes in C/C++
This book covers sorting in Perl: http://www.oreilly.com/catalog/maperl/
J
Hi,
On Thu, 10 Jan 2002 Michael Fowler spewed into the ether:
[-- snip --]
> Um, how do you figure? The sudo program prints out the "Password:" prompt,
> and from your output you can clearly see "test" is after "Password:". So
> sudo is being run before "test" is printed.
Yes, I noticed that _
> -Original Message-
> From: Randolph S. Kahle [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, January 12, 2002 11:22 AM
> To: [EMAIL PROTECTED]
> Subject: How do I delete a file from Perl?
>
>
> I am writing my first perl program (copied from a magazine).
>
> The only line that is not wor
I am writing my first perl program (copied from a magazine).
The only line that is not working is
system( rm -rf $file );
The error message is:
Can't call method "rm" with a package or object reference.
Any tips?
Thanks -- Randy
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additio
You seem to have looked at Chart-Plot.
You might try
use Chart::Plot;
my $img = Chart::Plot->new(400,400);
my @data;
for (1..1) { push @data, rand() }
$img->setData (\@dataset, 'black noline points');
open (WR,'>plot.png') or die ("Failed to write file: $!");
binmode WR;
print WR $img->d
On Fri, 11 Jan 2002 14:47:08 -0800, [EMAIL PROTECTED] (Gary Hawkins) wrote:
>Seems a good example of how every little question has some merit. You just
>never know.
>
>So Hewlett's question gave me an idea. Just print my scripts to the screen
>with line numbers added. My life is now better. S
Hi,
I am able to install Perl 5.6.1 on my solaris box, but cannot get it to
include SuidPerl in the installation.
Do I have to enable something in the ""Configure"" script?
""d_dosuid"" maybe?
Or is it something to do with SUID in my Solaris Kernel that I need to
enable or disable.
Am not sure.
Rob,
Thank you for the quick reply on the line numbers.
You were right - the line number in the error message was in one of the "use
xxx" modules.
And my face is slightly red from embarrassment re the "how can line numbers
be displayed": Your reply about using a different editor sent me to
O'R
I am a total beginner to perl. I wrote the program below to open a program
file, read it line by line, and write each line to an output file after
first putting two string lines out there. It compiles without errors but the
output is a filename with zero length. What did I do wrong? Thank you!
In article <[EMAIL PROTECTED]>, Naveen Parmar wrote:
> Any site that provides details on the different command line switches?
No need to waste bandwidth when all the relevant infos are on
your system! :)
perldoc perlrun
--
briac
Bankei departs under
an oak tree. Ten bears
In article <[EMAIL PROTECTED]>, Zentara wrote:
> Hi, I found a nifty little perl module on Perlmonks.org.
> It is called Filter::NumberLines
> (...)
> I can't find a url on the net for it, so here it is:
Here's the URL of this filter:
http://www.perlmonks.org/index.pl?node_id=125831
--
briac
> It's taken me a while to wrap my head around
> references, since I thought they were always
> Perl-specific. (At least, the term 'reference' doesn't
> show up in K&R!)
>
> Anyway, it finally occurred to me that the term
> 'reference' might just be Perlish for what other
> languages (C, I'm thin
Richard C 1 wrote:
>
> I am a total beginner to perl. I wrote the program below to open a program
> file, read it line by line, and write each line to an output file after
> first putting two string lines out there. It compiles without errors but the
> output is a filename with zero length. What
try using unlink instead.
On 12 Jan 2002, Randolph S. Kahle wrote:
> I am writing my first perl program (copied from a magazine).
>
> The only line that is not working is
>
> system( rm -rf $file );
>
> The error message is:
>
> Can't call method "rm" with a package or object reference.
>
> Any
Randy,
You can delete a file, or a list of files, using "unlink". Example:
##
unlink $file;
##
perldoc -f unlink
Hope that helps.
Ahmed
[EMAIL PROTECTED] | http://www.photo.net/user/ahmed
Randolph S. Kahle wrote:
> I am writing my first perl program (copied from a magazine).
>
> The only li
Rabs wrote:
>
> Hi everyone Im trying to get this script to work, I am wondering if anyone
> in this group can help me.
>
> #!/usr/bin/perl-w
> use strict;
>
> @a= (1, 2, 3, 4);
> foreach $word(@a){
> print $word ;
> }
>
> When I run this script I get the following error messages, can you ex
Friday, January 11, 2002, 3:12:19 PM, Scott wrote:
> I am reading a file into a list and then formatting it to prepare it for a
> mainframe. Currently I read the contents into a list as such:
> my @fields = split(/\t/, $record)
> and then I call them by $fields[0], etc.
> Would it be more bene
Hello James
Thank you for our interest. My problem is as followed ;
I have an application WinRunner which is used for Test case automation. It
record all the GUI Object of the application in GUI Map ( in a tree view
structure) which actually store details property of all object under a
partic
- Original Message -
From: "Gary Hawkins" <[EMAIL PROTECTED]>
To: "Hewlett Pickens" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Seems a good example of how every little question has some merit. You
just
> never know.
I sure agree with you on this.
> I've had the same problem on Windows
Hi everyone Im trying to get this script to work, I am wondering if anyone
in this group can help me.
#!/usr/bin/perl-w
use strict;
@a= (1, 2, 3, 4);
foreach $word(@a){
print $word ;
}
When I run this script I get the following error messages, can you explain
in simple english they mean . A
> system("rm -rf $file");
>
> But if you copied this from another source, that source was totally
> unaware that deletion of files like THAT is TOTALLY unsafe. A safer
> approach is:
>
> system("rm", "-rf", $file);
I'm not aware of the reason for it.
What's a good way to find which perl doc
SInce you are running with strict, then all your variables would need to be
fully gualified(ie, $main::a, $main::word, etc) or if you add my to each variable,
then it would work.
Wags ;)
-Original Message-
From: rabs [mailto:[EMAIL PROTECTED]]
Sent: Saturday, January 12, 2002 1
#!/usr/bin/perl-w
use strict;
my @a= (1, 2, 3, 4);
foreach my $word(@a){
print $word ;
}
try this...
Mike
-Original Message-
From: rabs [mailto:[EMAIL PROTECTED]]
Sent: Saturday, January 12, 2002 8:01 PM
To: [EMAIL PROTECTED]
Subject: Another simple program which wont work.
Hi every
Friday, January 11, 2002, 8:32:56 AM, Connie Chan wrote:
> now, I am writing a script which to let user modify the password of
> their email account automatically, but our email server will encrypy
> the password in some ways. so it makes me unable to cmp or write.
> such as, if I give "A"
The rm -rf $file should be in quotes
system( "rm -rf $file" )
but make sure file isn't / !!! :)
- Original Message -
From: "Randolph S. Kahle" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, January 12, 2002 11:21 AM
Subject: How do I delete a file from Perl?
> I am writi
It's "perldoc -f system" not "perldoc system".
--Ahmed
Gary Hawkins wrote:
>> system("rm -rf $file");
>>
>>But if you copied this from another source, that source was totally
>>unaware that deletion of files like THAT is TOTALLY unsafe. A safer
>>approach is:
>>
>> system("rm", "-rf", $file);
Hi,
On Fri, 11 Jan 2002 Pieter Blaauw spewed into the ether:
> Hi guys
>
> How would I do the following. Platform is a Red Hat 7.2 Linux box with
> Pine 4.44 as my mail client. Now pine stores all your mail in the usual
> /var/spool/mail/
>
> Can I use perl to extract all the mail from 2001 int
Hi,
On Fri, 11 Jan 2002 Pieter Blaauw spewed into the ether:
> Hi guys
>
> How would I do the following. Platform is a Red Hat 7.2 Linux box with
> Pine 4.44 as my mail client. Now pine stores all your mail in the usual
> /var/spool/mail/
>
> Can I use perl to extract all the mail from 2001 int
This newsgroup is great. I am learning alot from just reading the post
here. I hope someone will be able to help with this query.
-
#!/usr/bin/perl-w
print "please enter a word then press enter\n";
@a= ;
$L =@a;
for ($i=0; $i<=$L; $i++){
print $a[$i];
}
print "\n there are $L varib
On Jan 12, Gary Hawkins said:
>> system("rm -rf $file");
>>
>> But if you copied this from another source, that source was totally
>> unaware that deletion of files like THAT is TOTALLY unsafe. A safer
>> approach is:
>>
>> system("rm", "-rf", $file);
>
>I'm not aware of the reason for it.
> system( rm -rf $file );
> Any tips?
Try 'system("rm", "-rf", $file)'. The quotes are not really
necessary here (I think), but you should use them, because otherwise
"rm" and "rf" will be interpreted as barewords, and you might get in
conflict with the reserved ones.
HTH,
Elias
--
T
On Jan 12, Randolph S. Kahle said:
>The only line that is not working is
>
>system( rm -rf $file );
You (or they) have forgotten the quotes:
system("rm -rf $file");
But if you copied this from another source, that source was totally
unaware that deletion of files like THAT is TOTALLY unsafe.
On Jan 13, rabs said:
>#!/usr/bin/perl-w
>print "please enter a word then press enter\n";
>@a= ;
>$L =@a;
>for ($i=0; $i<=$L; $i++){
>print $a[$i];
>}
Your loop should be
for ($i = 0; $i < $L; $i++) { ... }
Notice <= should be <. It should also be noted that the idiomatic way of
looping ove
Hi pholks,
It's taken me a while to wrap my head around
references, since I thought they were always
Perl-specific. (At least, the term 'reference' doesn't
show up in K&R!)
Anyway, it finally occurred to me that the term
'reference' might just be Perlish for what other
languages (C, I'm thinking
There are a number of modules for plotting and drawing images: I am not an
expert in this field. I think you will need GD, and I think that has a
routine to plot a point - it might be called 'draw'. I would bow to the
advice of the gurus on this point!
- Roger -
- Original Message -
From:
I believe the two terms, reference and pointer, are equivalent. By the
way, In Java, they call it reference also, I think.
--Ahmed
[EMAIL PROTECTED] | http://www.photo.net/users/ahmed
Patrick Hall wrote:
> Hi pholks,
>
> It's taken me a while to wrap my head around
> references, since I thoug
I've got a laptop running Linux. When I go to work, the laptop gets it's
IP address via DHCP, at home I have a private IP address that I use (for a
home network that uses dial up for Internet), and at my other place of
employ I have a third IP address that is used.
I've created a shell script
> It's taken me a while to wrap my head around
> references, since I thought they were always
> Perl-specific. (At least, the term 'reference' doesn't
> show up in K&R!)
>
> Anyway, it finally occurred to me that the term
> 'reference' might just be Perlish for what other
> languages (C, I'm thin
> This newsgroup is great. I am learning alot from just reading the post
> here. I hope someone will be able to help with this query.
Me too. But I learned a new word yesterday, pedantic. Just wanted to try it
out, here goes. :<
Listserves: Email lists are read in an email program or on the
On Fri, Jan 11, 2002 at 07:16:29AM -0500, zentara wrote:
> I've been playing with File::Basename and
> the docs are not absolutely clear on whether
> you can get an extension on a linux system.
> I have had no success trying, so does this mean
> that linux is not capable of dealing with extensions
It should be $i<$L and just 0 and not $0 ( $0 is the script name );
Wags ;) ps You should realize that the c/r remains with each line.
-Original Message-
From: rabs [mailto:[EMAIL PROTECTED]]
Sent: Saturday, January 12, 2002 17:52
To: [EMAIL PROTECTED]
Subject: Another simple pro
On Jan 12, Naveen Parmar said:
>Any site that provides details on the different command line switches?
You have the documentation on your computer:
perldoc perlrun
--
Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/
RPI Acacia brother #734 http://www.perlmonks.
> -Original Message-
> From: Prahlad Vaidyanathan [mailto:[EMAIL PROTECTED]]
> Sent: Friday, January 11, 2002 4:52 AM
> To: [EMAIL PROTECTED]
> Cc: Michael Fowler
> Subject: Re: why does open()ing happen only at the line ?
>
>
> Hi,
>
> On Thu, 10 Jan 2002 Michael Fowler spewed into th
You have an extra angle bracket.
Should be:
open (INFILE, "> means append.
< means read.
<< is just confusing... ;-)
- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, January 11, 2002 1:16 PM
Subject: This Simple program won't work - why?
>
> I am a
On Sat, 12 Jan 2002, Leon wrote:
> - Original Message -
> From: "Gary Hawkins" <[EMAIL PROTECTED]>
> To: "Hewlett Pickens" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> > I've had the same problem on Windows 2000 and have been using edit.com to
> find
> > line numbers in my scripts, and it i
--- [EMAIL PROTECTED] wrote:
>
> I am a total beginner to perl. I wrote the program below to open a program
> file, read it line by line, and write each line to an output file after
> first putting two string lines out there. It compiles without errors but the
> output is a filename with zero len
On Jan 12, Gary Hawkins said:
>> This newsgroup is great. I am learning alot from just reading the post
>> here. I hope someone will be able to help with this query.
>
>Me too. But I learned a new word yesterday, pedantic. Just wanted to try it
>out, here goes. :<
There is a newsgroup interf
Gary wrote:
> Listserves: Email lists are read in an email program or on the web and
are
> handled by SMTP.
> Newsgroups: Hosted on news servers, they are read by newsgroup software
or on
> the web, and are handled by NNTP.
>
> So this is a listserve. Forgive me, I'm a Virgo.
>
> Listserve, we
Jeff 'Japhy' Pinyan wrote:
>
> On Jan 12, Gary Hawkins said:
>
> >> This newsgroup is great. I am learning alot from just reading the post
> >> here. I hope someone will be able to help with this query.
> >
> >Me too. But I learned a new word yesterday, pedantic. Just wanted to try it
> >out,
Mark Ross wrote:
>
> Hi all,
Hello,
> I'm wondering if there is a difference between:
>
> $foo{'bar'}
> and
> $foo{bar}
No difference (depending on which version of Perl you are using.)
> Is there any important difference? I prefer to use
> single quotes (my editor handles color coding bett
57 matches
Mail list logo