Re: perl cumulative module question

2008-11-27 Thread ben perl
Thanks Everyone!! This should help. On Sat, Nov 22, 2008 at 9:17 AM, Rob Dixon <[EMAIL PROTECTED]> wrote: > Rob Dixon wrote: > > > > Your arithmetic is odd. You say > > > > 9-4 = 2 > > > > and so your resulting list should be (2,4,2). If you want to subtract the > > previous result from the ne

Re: perl cumulative module question

2008-11-22 Thread Rob Dixon
Rob Dixon wrote: > > Your arithmetic is odd. You say > > 9-4 = 2 > > and so your resulting list should be (2,4,2). If you want to subtract the > previous result from the next item in your data list each time then this will > do > the job. > > HTH, > > Rob > > > use strict; > use warnings;

Re: perl cumulative module question

2008-11-22 Thread Rob Dixon
ben perl wrote: > Is there a perl module to find cumulative in a column? It should subtract > from the previous row and creates new column. > > For example, If i have the follow column in my file > > 2 > 6 > 9 > > It gives me > > 2 > 6-2 = 4 > 9-4 = 2 > > So the resulting column is > > 2 > 4

Re: perl cumulative module question

2008-11-22 Thread Jay Savage
On Sat, Nov 22, 2008 at 10:28 AM, ben perl <[EMAIL PROTECTED]> wrote: > Is there a perl module to find cumulative in a column? It should subtract > from the previous row and creates new column. > > For example, If i have the follow column in my file > > 2 > 6 > 9 > > It gives me > > 2 > 6-2 = 4 > 9

perl cumulative module question

2008-11-22 Thread ben perl
Is there a perl module to find cumulative in a column? It should subtract from the previous row and creates new column. For example, If i have the follow column in my file 2 6 9 It gives me 2 6-2 = 4 9-4 = 2 So the resulting column is 2 4 2 Hope I am using cumulative as the right word to exp

Re: module question

2008-06-14 Thread Jeff Peng
On Sun, Jun 15, 2008 at 2:19 AM, Richard Lee <[EMAIL PROTECTED]> wrote: > > thank you! it works now. > > First time ever using our.. I read about it but never had to use it till > now.. just have to read up on it more. > You may also read this classical article for Perl's variable scope: http:/

Re: module question

2008-06-14 Thread Richard Lee
Jeff Peng wrote: On Sat, Jun 14, 2008 at 11:21 PM, Richard Lee <[EMAIL PROTECTED]> wrote: trying to follow some modules examples.. but have a quick quesiton Below pm works if I don't use strict and use @ISA and @EXPORT.. but not when I use strict and my @ISA and my @EXPORT @I

Re: module question

2008-06-14 Thread Jeff Peng
On Sat, Jun 14, 2008 at 11:21 PM, Richard Lee <[EMAIL PROTECTED]> wrote: > trying to follow some modules examples.. but have a quick quesiton > > Below pm works if I don't use strict and use @ISA and @EXPORT.. but not > when I use strict and my @ISA and my @EXPORT > @ISA and @EXPORT are p

module question

2008-06-14 Thread Richard Lee
trying to follow some modules examples.. but have a quick quesiton Below pm works if I don't use strict and use @ISA and @EXPORT.. but not when I use strict and my @ISA and my @EXPORT am i not suppose to use strict for modules?? --- only works..

Re: Module question

2007-05-24 Thread Jeff Pang
David Moreno Garza 写道: Jeff Pang wrote: @EXPORT was used for exporting symbol (methods or variables) by default. When you say, use base 'Exporter'; our @EXPORT = qw/&mysub/; .. then mysub() would be exported into caller's name space defaultly. Would that also work using: our @EXPORT = qw/mysu

Re: Module question

2007-05-24 Thread David Moreno Garza
Jeff Pang wrote: > @EXPORT was used for exporting symbol (methods or variables) by default. > When you say, > use base 'Exporter'; > our @EXPORT = qw/&mysub/; > .. > then mysub() would be exported into caller's name space defaultly. Would that also work using: our @EXPORT = qw/mysub/; ? Or is

Re: Module question

2007-05-17 Thread Jeff Pang
Robert Hicks 写道: Is @EXPORT_OK for those items you want to import by "name" and %EXPORT_TAGS for those items you want to group like :all or :select? Almost right. What is @EXPORT used for then if that is the case above? @EXPORT was used for exporting symbol (methods or variables) by defa

Module question

2007-05-17 Thread Robert Hicks
Is @EXPORT_OK for those items you want to import by "name" and %EXPORT_TAGS for those items you want to group like :all or :select? What is @EXPORT used for then if that is the case above? Robert -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ht

Re: Module question

2005-08-06 Thread Robert
On 8/6/05 12:04 PM, in article [EMAIL PROTECTED], "Xavier Noria" <[EMAIL PROTECTED]> wrote: > On Aug 6, 2005, at 17:32, Robert wrote: > >> If I have ideas for modules I want to contribute do I "register" those >> with CPAN first? > > This page explains the process and gives some advices: > >

Re: Module question

2005-08-06 Thread Xavier Noria
On Aug 6, 2005, at 17:32, Robert wrote: If I have ideas for modules I want to contribute do I "register" those with CPAN first? This page explains the process and gives some advices: http://perldoc.perl.org/perlnewmod.html -- fxn -- To unsubscribe, e-mail: [EMAIL PROTECTED] For addition

Module question

2005-08-06 Thread Robert
If I have ideas for modules I want to contribute do I "register" those with CPAN first? Robert -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Perl module question

2004-12-05 Thread Stephen Liu
Hi, Tks for your advice. --- PerlDiscuss - Perl Newsgroups and mailing lists <[EMAIL PROTECTED]> wrote: - snip - > PATH. What you need to do now is investigate those > tests to see why they didn't pass. Follows are the errors found on running sudo perl -MCPAN -e 'install Tk' - snip - t/di

Re: Perl module question

2004-12-04 Thread PerlDiscuss - Perl Newsgroups and mailing lists
Stephen Liu wrote: > Further to my last posting > $ perl wget_window.pl > Can't locate Tk.pm in @INC (@INC contains: > Tk.pm module still could not be found It can't be found because it didn't install: > t/zzScrolled.FAILED tests 66, 94 ... > /usr/bin/make test -- NOT OK >

Re: Perl module question

2004-12-04 Thread Stephen Liu
Hi Chris, Further to my last posting $ perl wget_window.pl Can't locate Tk.pm in @INC (@INC contains: /usr/lib/perl5/5.8.3/i386-linux-threa d-multi /usr/lib/perl5/5.8.3 /usr/lib/perl5/site_perl/5.8.3/i386-linux-thread-mu lti /usr/lib/perl5/site_perl/5.8.2/i386-linux-thread-multi /

Re: Perl module question

2004-12-04 Thread Stephen Liu
Hi Chris, Tks for your advice. > > # perl -MCPAN -e 'install Tk.pm' > > The .pm suffix isn't necessary in this situation: > > $ sudo perl -MCPAN -e 'install Tk' $ sudo perl -MCPAN -e 'install Tk' . .. 6# Test 66 got: '589x341+0+32' (t/zzScrolled.t at line 104 fail #2)

Re: Perl module question

2004-12-04 Thread Chris Devers
On Sat, 4 Dec 2004, Stephen Liu wrote: > # perl -MCPAN -e 'install Tk.pm' The .pm suffix isn't necessary in this situation: $ sudo perl -MCPAN -e 'install Tk' (Root isn't necessary either, if you have sudo access.) -- Chris Devers -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additi

Perl module question

2004-12-04 Thread Stephen Liu
Hi folks, Running $ perl wget_window.pl Can't locate Tk.pm in @INC (@INC contains: /usr/lib/perl5/5.8.3/i386-linux-thread-multi /usr/lib/perl5/5.8.3 /usr/lib/perl5/site_perl/5.8.3/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.2/i386-linux-thread-multi # perl -MCPAN -e 'install Tk.

YPM::Yapp module question

2004-12-01 Thread radhika sambamurti
Hi, I have a need to work with a perl script that uses quite a few YPM modules. YPM::Yapp and so on. When I do perldoc YPM::Yapp, the module referes to YPM scripts. What does this mean? Thanks. Radhika -- It's all a matter of perspective. You can choose your view by choosing where to stand. Larr

Re: newbie module question

2003-04-02 Thread Alfred Vahau
3267 187 From: Leon [mailto:[EMAIL PROTECTED] Sent: Friday, March 28, 2003 1:23 PM To: [EMAIL PROTECTED] Subject: newbie module question Hi everyone, I am really really new to perl. I know this is dumb but I am using perl in the win 32 environement (perl 5.8.0 build

RE: newbie module question (FOUO)

2003-04-02 Thread Meidling, Keith, CTR, OSD-C3I
March 28, 2003 1:23 PM To: [EMAIL PROTECTED] Subject: newbie module question Hi everyone, I am really really new to perl. I know this is dumb but I am using perl in the win 32 environement (perl 5.8.0 build 804) from active state. I am trying to figure out how to install modules. Where do yo

RE: newbie module question

2003-03-28 Thread Hanson, Rob
ECTED] Sent: Friday, March 28, 2003 1:23 PM To: [EMAIL PROTECTED] Subject: newbie module question Hi everyone, I am really really new to perl. I know this is dumb but I am using perl in the win 32 environement (perl 5.8.0 build 804) from active state. I am trying to figure out how to install modu

newbie module question

2003-03-28 Thread Leon
Hi everyone, I am really really new to perl. I know this is dumb but I am using perl in the win 32 environement (perl 5.8.0 build 804) from active state. I am trying to figure out how to install modules. Where do you get them from? How do you install them? Other things I need to know? T

Re: Multiple use of same module question

2003-01-24 Thread Paul Johnson
Jenda Krynicky said: > From: "Paul Johnson" <[EMAIL PROTECTED]> >> As I recall, someone (Timothy Johnson?) said they got errors from >> using Win32 more than once and resorted to requiring it to silence the >> errors. I don't think we ever saw the error messages or the code. >> This prompted me t

Re: Multiple use of same module question

2003-01-24 Thread Jenda Krynicky
From: "Paul Johnson" <[EMAIL PROTECTED]> > As I recall, someone (Timothy Johnson?) said they got errors from > using Win32 more than once and resorted to requiring it to silence the > errors. I don't think we ever saw the error messages or the code. > This prompted me to write the first paragraph

Re: Multiple use of same module question

2003-01-24 Thread Paul Johnson
Jenda Krynicky said: > From: "Paul Johnson" <[EMAIL PROTECTED]> >> It sounds like something is broken in the Win32 import sub (I have >> never used or looked at Win32.pm), or that there is some other >> problem, but import guards are not the solution. > > No there is nothing broken. The modules A

Re: Multiple use of same module question

2003-01-24 Thread Jenda Krynicky
From: "Paul Johnson" <[EMAIL PROTECTED]> > R. Joseph Newton said: > > worry about that at all. In C/C++, one of the standards for writing > > any header file is to always surround the entirety with an inclusion > > guard to prevent the precompiler from redefining classes or > > redeclarating other

Re: Multiple use of same module question

2003-01-24 Thread Paul Johnson
R. Joseph Newton said: >> And that finally explains why in some of my scripts using the >> Win32::Lanman >> module I have to do a 'require Win32;' instead of a 'use Win32' if I >> don't >> want to get warning messages about conflicting constants. > > I*t sems to me that this is sort of a shortcom

Re: Multiple use of same module question

2003-01-23 Thread R. Joseph Newton
Timothy Johnson wrote: > I agree, but I'm not quite to the point where I can go back and fix it > myself. Yes, you can. That's why Perl modules are open source. If you want to be less radical, open the pm, find at least one constant it defines, and surround your use statements with similar, bu

RE: Multiple use of same module question

2003-01-23 Thread Timothy Johnson
ple use of same module question > And that finally explains why in some of my scripts using the Win32::Lanman > module I have to do a 'require Win32;' instead of a 'use Win32' if I don't > want to get warning messages about conflicting constants. I*t sems to me t

Re: Multiple use of same module question

2003-01-23 Thread R. Joseph Newton
> And that finally explains why in some of my scripts using the Win32::Lanman > module I have to do a 'require Win32;' instead of a 'use Win32' if I don't > want to get warning messages about conflicting constants. I*t sems to me that this is sort of a shortcoming, if you have to worry about that

RE: Multiple use of same module question

2003-01-23 Thread Dan Muey
Thanks I'll do that. > > From: "Dan Muey" <[EMAIL PROTECTED]> > > Here's something I've been wondering > > > > What kind of performance issues are there if you do a 'use' on the > > same module in the same script twice or more? > > Depends. > This can be verry different for different modul

Re: Multiple use of same module question

2003-01-23 Thread Jenda Krynicky
From: "Dan Muey" <[EMAIL PROTECTED]> > Here's something I've been wondering > > What kind of performance issues are there if you do a 'use' on the > same module in the same script twice or more? Depends. This can be verry different for different modules. use Module; does two things:

RE: Multiple use of same module question

2003-01-23 Thread Timothy Johnson
I'll figure out why when I get some extra time" issues. I love it when the light bulb finally comes on. -Original Message- From: Dan Muey [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 23, 2003 9:37 AM To: Rob Dixon; [EMAIL PROTECTED] Subject: RE: Multiple use of same module que

RE: Multiple use of same module question

2003-01-23 Thread Dan Muey
So I don't have to worry about doing use Module; or varitions of it like use Module stuffdealy; more than once causing performance issues? Great, thanks that's load off! Dan > > Hi Dan > > Dan Muey wrote: > > Here's something I've been wondering > > > > What kind of performance issues ar

Re: Multiple use of same module question

2003-01-23 Thread Rob Dixon
Hi Dan Dan Muey wrote: > Here's something I've been wondering > > What kind of performance issues are there if you do a 'use' on the > same module in the same script twice or more? I posted the following earlier today in response to a question of Beau's: Rob Dixon wrote: > Beau E. Cox wrote:

Multiple use of same module question

2003-01-23 Thread Dan Muey
Here's something I've been wondering What kind of performance issues are there if you do a 'use' on the same module in the same script twice or more? Before you go ' Well that's stupid, why would you do that? ' let me explain : Script one has use CGI; require stumpy.lib; stumpy_funtion

Re: General module question, can't get anything imported.

2001-08-01 Thread Troy Denkinger
On Wednesday 01 August 2001 23:59, jeffl wrote: > !/usr/bin/perl Once I changed the above to #!/usr/bin/perl your script and module worked for me. If that doesn't fix it, run the script by invoking the perl interpreter: perl test.pl and see what happens. Regards, Troy -- To unsubscrib

General module question, can't get anything imported.

2001-08-01 Thread jeffl
I tried building my own module but I can't get the calling script to see the variables being imported. # below is the module --- #!/usr/bin/perl package Foo; require Exporter; our @ISA = qw(Exporter); our @EXPORT = qw($foo_var); o

Re: module question

2001-07-20 Thread Jerry Preston
Maxim, Thanks, Jerry Maxim Berlin wrote: > > Hello Jerry, > > Friday, July 20, 2001, Jerry Preston <[EMAIL PROTECTED]> wrote: > > JP> I tried $$ and still no output. What in the module did I do to > JP> make you think the $$ would work? > > do you replace > %wdf = $ki->test; > with > $w

Re[2]: module question

2001-07-20 Thread Maxim Berlin
Hello Jerry, Friday, July 20, 2001, Jerry Preston <[EMAIL PROTECTED]> wrote: JP> I tried $$ and still no output. What in the module did I do to JP> make you think the $$ would work? do you replace %wdf = $ki->test; with $wdf = $ki->test; too? your module returns a reference(\%wdf), so you s

Re: module question

2001-07-20 Thread Jerry Preston
Maxim, I tried $$ and still no output. What in the module did I do to make you think the $$ would work? Thanks, Jerry Maxim Berlin wrote: > > Hello Jerry, > > Friday, July 20, 2001, Jerry Preston <[EMAIL PROTECTED]> wrote: > > JP> My program to test out my module is: > > JP> #!/usr/local

Re: module question

2001-07-20 Thread Maxim Berlin
Hello Jerry, Friday, July 20, 2001, Jerry Preston <[EMAIL PROTECTED]> wrote: JP> My program to test out my module is: JP> #!/usr/local/bin/perl JP> use CGI; JP> use CGI::Carp qw(fatalsToBrowser); JP> use KI; JP> $ki = new KI(); JP> $query=new CGI; JP> print $query->header(); JP>

module question

2001-07-20 Thread Jerry Preston
Hi, I am trying to build my first module: package KI; # Create a constructor method =head1 new() Create a new KI object =cut sub new{ my $class = shift; my $self = {}; bless $self, $class; return $self; } # end method new =head1 test test =cut sub test { my $self = shift;

RE: Re: Module question

2001-07-19 Thread Eric J. Wisti
, July 20th 2001. Eric On Thu, 19 Jul 2001, Bob Showalter wrote: > Date: Thu, 19 Jul 2001 17:13:03 -0400 > From: Bob Showalter <[EMAIL PROTECTED]> > To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]> > Cc: [EMAIL PROTECTED] > Subject: RE: Re: Module question

RE: Re: Module question

2001-07-19 Thread Bob Showalter
[EMAIL PROTECTED] wrote: > Like I said I was frustrated. I'm using the Deitel and > Deitel book. But it is probably not it's fault. I'm just confused. Don't know the book. I Suggest the O'Reilly books. > I thought I understood I needed to define how I should use > the module so it would use

Re: Re: Module question

2001-07-19 Thread anna . roberts
Like I said I was frustrated. I'm using the Deitel and Deitel book. But it is probably not it's fault. I'm just confused. I thought I understood I needed to define how I should use the module so it would use it. But from what you just said I guess not. Please provide assistance or a exa

Re: Module question

2001-07-19 Thread Michael Fowler
On Thu, Jul 19, 2001 at 03:38:32PM -0400, [EMAIL PROTECTED] wrote: > use Date::Calc; > sub dateFriday > { > $day="friday"; > $num="3"; > my $dumpday = " $num $day "; > print ("$dumpday for level0 dump."); > } > print ( "Time to do level 0 dump\n", $d->dateFriday() ) ; I don't un

Module question

2001-07-19 Thread anna . roberts
Okay now I'm really frustrated. I downloaded the CPAN module got it installed made sure everthing was installed right. Proceeded to try and use it my program and it dosen't work. For me atleast. I'm not sure what I"m doing wrong. It is so simple I'm sure but well I'm not getting it. :( P