Re: puppet-like Perl application

2014-11-20 Thread Nick Pongratz
(R)?ex (mentioned on your linked Wikipedia page) might be what you're looking for: http://www.rexify.org/ Gabor Szabo at Perl Maven recently wrote up an article on using Rex: http://perlmaven.com/levels-of-security-using-rex -- Nick Pongratz Software Engineer | CDW 5520 Research Pa

Re: iterating over a hash to print it

2009-08-11 Thread Nick Brown
name => 'from BAR' } ] } ]; to get the date of the first transaction I tried: print $ofx_data->[0]{tranactions}->[0]{date}; but that fails. How do I access this inner hash? Thanks, Nick 2009/8/7 John Refior : > On Thu, Aug 6

Re: iterating over a hash to print it

2009-08-06 Thread Nick Brown
x27;t call method "account_id" on unblessed reference at download_statements.pl line 72, <> line 1. Can anyone suggest the correct way for me to access the account_id? Thanks, Nick 2009/7/19 Brandon Fosdick : > Sorry I've been too busy lately to pay attention to this thre

Re: iterating over a hash to print it

2009-07-16 Thread Nick Brown
2009/7/16 John W. Krahn : > Nick Brown wrote: >> >> On Jul 15, 11:15 am, jwkr...@shaw.ca (John W. Krahn) wrote: >>> >>> Nick Brown wrote: >>>> >>>> I'm trying to use Finance::OFX::Response to use a ofx statement I've >>&g

Re: iterating over a hash to print it

2009-07-16 Thread Nick Brown
On Jul 15, 11:15 am, jwkr...@shaw.ca (John W. Krahn) wrote: > Nick Brown wrote: > > I'm trying to use Finance::OFX::Response to use a ofx statement I've > > it downloaded from by bank website. > >http://search.cpan.org/~bfoz/p5-Finance-OFX-20080303/lib/Finance/OFX/..

iterating over a hash to print it

2009-07-15 Thread Nick Brown
ile( my ($k, $v) = each $ofx_response->ofx ) { print "key: $k, value: $v.\n"; } Can you suggest what is wrong the while loop I'm trying to use to print the hash tree of the OFX? Thanks, Nick -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Directory Size

2005-08-28 Thread Nick
Hi All, Is there a way to get an entire directory and all sub-files/folders size in Perl? Basicly, I need the Perl version of "du -s". I've currently done it with stat but this only gives a directory size not taking into consideration everything inside it. Nick -- To unsu

Analyze Log

2005-08-11 Thread Nick
nd all I get is an empty hash! Could anyone advise what I am doing wrong or if I am attempting this is the wrong way? Thanks, Nick -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Re: Perl Analyzing Maillog

2005-03-22 Thread Nick Chettle
Still matches part of the larger string. ([A-Z1-9]{8,8}): - Won't match. ([A-Z1-9]{8,8})\: - Won't match. Can anyone advise what I should be doing with the regex? Thanks, Nick -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Re: Perl Analyzing Maillog

2005-03-21 Thread Nick Chettle
Wagner, David --- Senior Programmer Analyst --- WGO wrote: Then concatenate in something like: $msgids{"$1"} .= $msgarray[$_]; Wags ;) Thanks for the speedy response. Sorry, but I don't understand how to use that. Surely that would be trying to index an array but a great l

Re: Perl Analyzing Maillog

2005-03-21 Thread Nick Chettle
n the last line matched. What I'd like, is for the array to have all four lines in rather than overwriting each time a new match is found. Is this possible with the kind of approach we are looking at? Nick -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

[Fwd: Re: Perl Analyzing Maillog]

2005-03-19 Thread Nick Chettle
se of a variable in void context at ./id line 20. Could you advise what I am doing wrong here? I'd just like to say thank you for yours (And mgoland, and Zeus) help with this. Each a very helpfull and informative reply (Even if I don't quite fully understand yet!). Charles K. Clarkson wr

Re: Perl Analyzing Maillog

2005-03-16 Thread Nick Chettle
ould simply do: for (sort keys %msgids) { print $msgids{$_}; } To print each line found. For some reason this returns nothing. Thanks for your help. Hope my questions aren't too simple! Nick [EMAIL PROTECTED] wrote: - Original Message - From: Nick Chettle <[EMAIL PROTECTED]> Da

Perl Analyzing Maillog

2005-03-16 Thread Nick Chettle
ay of doing it and it's less than efficient as I have to cat the entire maillog for each message id. I've been trying to open the filehandle again and then somehow get foreach to go through it but haven't had much sucess. Can anyone advise if I'm looking along the right lin

search and replace in complexed text file?

2003-11-21 Thread Nick Ellson
tting Perl is my best and perhaps only option to do this with minimal developement time. Any text manipulators out there see a way to do this from what I have described? Nick [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Regular Expression

2003-07-15 Thread Nick Diel
to match either just la la or la la) bla bla (di da. Thanks, Nick -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Perl Monitor MySQL Table

2003-07-02 Thread Nick Diel
e box as the database). I know how to do basic database stuff with DBI, but I am still a perl beginner. Thanks, Nick -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: $?

2003-06-12 Thread Nick Drage
your exit code. I was given this answer by David van der Geer, who used: $exit_value = $? >> 8; I'm not sure what " >> 8 " means though, anyone? Also when I asked this Steve Grazzini ad

press any key

2003-03-19 Thread Nick Drage
Hi, Quite a simple request, but I've had trouble finding an answer. I'd like my program to wait until the user presses any key, and then just continue. Is there an easy way to do this? A way without modules? -- FunkyJesus System Administration Team -- To unsubscribe, e-mail: [EMAIL PROTECT

Re: Reading a file

2003-03-04 Thread Nick Drage
On Tue, Mar 04, 2003 at 11:24:55AM -, Rob Dixon wrote: > > @rgstr=; > > This puts the <> operator into list context, so it will read > all of the file, placing separate records into consecutive > elements of the array. If this is what you want to do, then > you have finished with the file a

Re: Piping ifconfig to a text file

2001-10-04 Thread Nick Drage
On Thu, Oct 04, 2001 at 11:47:53AM +0930, Daniel Falkenberg wrote: > Can some one help me with opening ifconfig and pipe it to a text file. > Then I want to be able to view that file. What do you want to do with the output when you view it in the file? Presumably if you just wanted to view the o

Incrementing Strings

2001-06-27 Thread Nick Transier
If I define a variable as a string my $var = "a"; I can get the increment to work print ++$var; --> prints b but the decrement print --$var --> prints -1 Why? and how can I decrement it? Thanks, -Nick _ Get your

comparing strings

2001-06-22 Thread Nick Transier
Does anyone know a way to make boolean comparisons between strings? For example, I want 'a' < 'b' to be true, but perl says 'a' == 'b' is true. Thanks, -Nick _ Get your FREE download of MSN Explorer at http://explorer.msn.com

truncating

2001-06-21 Thread Nick Transier
If I am generating a random number with the rand function, how can I truncate the resulting var to an integer? -Nick _ Get your FREE download of MSN Explorer at http://explorer.msn.com

PPM

2001-06-21 Thread Nick Transier
Ok, so I was wrong, I do have ppm, but I have "installed" the package but it doesn't work. I installed the clone package available from Activstate, but when I say "use clone" in my program, it says the files are missing. What i

PPM

2001-06-21 Thread Nick Transier
have downloaded a tar file of the module I want, but there is no PPD or XML file like is described in the documentation for ppm. I do have a c compiler however. Please help. Thanks, -Nick _ Get your FREE download of MSN Explorer at

Cloning

2001-06-21 Thread Nick Transier
Ok, so I see the way around the = problem with cloning, however, there is a clone module on CPAN, but I have no idea how to install it using win2k. Any ideas? Thanks, -Nick _ Get your FREE download of MSN Explorer at http

RE: =

2001-06-21 Thread Nick Transier
Isn't == a logical operator? I am not trying to compare the two objects. >From: "Sally" <[EMAIL PROTECTED]> >To: "Nick Transier" <[EMAIL PROTECTED]> >Subject: RE: = >Date: Thu, 21 Jun 2001 17:18:47 +0100 > >You should use == instead

=

2001-06-21 Thread Nick Transier
around this problem? Thanks, -Nick _ Get your FREE download of MSN Explorer at http://explorer.msn.com

Re: method calls outside the package

2001-06-20 Thread Nick Transier
I tried that, same error. "$perlversion requires explicit package name" >From: Jeff 'japhy' Pinyan <[EMAIL PROTECTED]> >Reply-To: [EMAIL PROTECTED] >To: Nick Transier <[EMAIL PROTECTED]> >CC: [EMAIL PROTECTED] >Subject: Re: method calls outside the

method calls outside the package

2001-06-20 Thread Nick Transier
Ok, I have a package package blah; { sub foo { print "I do not understand perl" return 5; } } Now, how do I call this function from outside the package? I have written this: $perlversion = blah::->foo; but it doesn't work, it asks for explicit package name. P

Shell Program

2001-06-20 Thread Nick Transier
I have written a module I want to test in a shell program, how do I load the module in another perl file to test the methods of the module's packages? -Nick _ Get your FREE download of MSN Explorer at http://explorer.msn.com

RE: $self def

2001-06-20 Thread Nick Transier
You are saying I cannot set the size of an array? I understand that you do not have to, but I need to in this case so that my iteration loops work correctly. >From: John Edwards <[EMAIL PROTECTED]> >To: 'Nick Transier' <[EMAIL PROTECTED]>, [EMAIL PROTECTED] >Su

Re: $self def

2001-06-20 Thread Nick Transier
So then would I access the nth element by @{$self->{Next}}[n] ?? >From: [EMAIL PROTECTED] (Randal L. Schwartz) >To: "Nick Transier" <[EMAIL PROTECTED]> >CC: [EMAIL PROTECTED] >Subject: Re: $self def >Date: 20 Jun 2001 09:29:41 -0700 > > >>>>

Passing between Packages

2001-06-20 Thread Nick Transier
$self var as the first parameter. This much I believe I understand...However, does that $self var then allow you to access all of the methods of it's originial package (2), or do have to make some sort of package definition? Thanks,

$self def

2001-06-20 Thread Nick Transier
the array referenced by Next? Thanks, -Nick _ Get your FREE download of MSN Explorer at http://explorer.msn.com

scope

2001-06-19 Thread Nick Transier
something else. Also, is it ok to call functions which take no parameters as just the function name. like $var = function; as opposed to $var = function(); Thanks, -Nick _ Get your FREE download of MSN Explorer at http

Re: Self Def

2001-06-19 Thread Nick Transier
The thing is, I want to set the array reference later and not when the object is being created. >From: [EMAIL PROTECTED] (Randal L. Schwartz) >To: "Nick Transier" <[EMAIL PROTECTED]> >CC: [EMAIL PROTECTED] >Subject: Re: Self Def >Date: 19 Jun 2001 14:12:13

Self Def

2001-06-19 Thread Nick Transier
{ my $invocant = shift; my $class = ref($invocant) || $invocant; my $self = { Next, @_, }; return bless $self,$class; } thanks, -Nick _ Get your FREE download of

Re: more class stuff

2001-06-18 Thread Nick Transier
the var? >From: Chas Owens <[EMAIL PROTECTED]> >To: [EMAIL PROTECTED] >Subject: Re: more class stuff >Date: 18 Jun 2001 17:57:14 -0400 > >On 18 Jun 2001 16:42:45 -0500, Nick Transier wrote: > > given this new function which acts as a constructor > > > &

more class stuff

2001-06-18 Thread Nick Transier
given this new function which acts as a constructor sub new { my $invocant = shift; my $class = ref($invocant) || $invocant; my $self = { Level => 999, Value => 999, Key => 999, @Next, @_,

class stuff

2001-06-18 Thread Nick Transier
at the $level'th level? $self->{Next[$level]} thanks, -Nick _ Get your FREE download of MSN Explorer at http://explorer.msn.com

Sub Calls

2001-06-18 Thread Nick Transier
Assuming I am defining an object which has as its only property a level associated with it, would these be the correct simple subroutines to retrieve and set that property. Also, is this the correct usage of the @_ array such that the level value would be 999 unless I called new(Level => somet

Private Data

2001-06-18 Thread Nick Transier
Does the C++ notion of private data have a similar structure in perl, when defining packages, I find that when I try to define global variables inside the package, but outside of all the subroutines, I get a million errors. Thanks, -Nick

class definition

2001-06-18 Thread Nick Transier
Here is a basic attribute definition from an O'Reilly Book: sub new { my $invocant = shift; my $class = ref($invocant) || $invocant; my $self = { color => "bay", legs => 4, @_ , }; return bless $self

Packages

2001-06-15 Thread Nick Transier
Do you have to end packages with any type of notation or command? I have written a module file with two packages in it, but I am having a hell of a time with miss-referenced or no reference vars in the file. Thanks, -Nick _ Get