/~lds/Crypt-CBC-2.12/
>
> --Ian
>
>
> On 4/10/06, Martin Moss
> <[EMAIL PROTECTED]> wrote:
> > All,
> >
> > I had some code which ran the old version of
> > Crypt::CBC (2.12).
> >
> > Using these headers to create the object:-
> >
>
All,
I had some code which ran the old version of
Crypt::CBC (2.12).
Using these headers to create the object:-
my $cipher = new
Crypt::CBC($ENCRYPTION_KEY,'Blowfish');
I've now built a new machine. Copied the database
values (encrpypted using the above) onto the new
machine DB using mysqldump
Hi Arijit,
As far as I'm aware SIGnals are the only generic
mechanism you can use to jump out of code from any
point of execution...
So without knowing the contents of the subroutine
you're running it's not easy to suggest a way for it
to work. Perhaps you could post that subroutine?
Is it doin
I've tried this with the latest version of XML::Simple
and still the same error..
--- Martin Moss <[EMAIL PROTECTED]> wrote:
> All,
>
> Since an upgrade of perl, some legacy code which
> uses
> XML::Simple has broken.
>
> This replicates the problem...
>
All,
Since an upgrade of perl, some legacy code which uses
XML::Simple has broken.
This replicates the problem...
my $xml=' ';
my $contents = eval {XMLin($xml)};
$xml is not utf8 encoded (Checked with
Encode::is_utf8) and when I run I get this error:-
no element found at line 1, column 0, by
I have no control over the documents we're
receiving...
I wanted to do something at this level:-
my $libxml = XML::LibXML->new();
$libxml->encoding('ISO-8859-1');
Marty
--- "Thomas, Mark - BLS CTR" <[EMAIL PROTECTED]>
wrote:
> > We use XML::LibXML in our code, which is in turn
> used to
>
All.
We use XML::LibXML in our code, which is in turn used
to parse the sent and received XML between our backend
and front end webservers...
Since we upgraded to perl 5.8.5 from 5.6.1 all our
processes which read the XML and then input that data
into ORACLE fail because the character encoding o
print "my hash value is '".$INST{DEV}->{dbhost}."'\n";
--- [EMAIL PROTECTED] wrote:
> With this new structure, how would I dereference the
> hash to return the text value instead of the hash
> reference?
>
> use strict;
>
> my %INST= (
> DEV => {
>fullname=> "DEVELOPMENT",
>
--- [EMAIL PROTECTED] wrote:
> Martin, thanks for the response. Yes there are
> multiple servers and I tried to simplify the code
> since I wasn't providing a full script. This can
> also help me minimize hard coding throughout the
> script.
Avoiding hard coding - always a good thing... :-)
Whe
I think this is what you're trying to do
But I'm not sure why? I'd only do this if you are
expecting to have multiple configs for dbhost, e.g.
devdb1, devdb2, devdb3... otherwise I'm not sure why
you'd break down the structure this much...
DEV => {
fullname=> "DEVELOPMENT",
Hi Craig,
You need to use a counter.
my $count =0;
$count++;
You will need to also check the counter on each loop
iteration using 'if' 'else' and 'last' to exit the
loop..
my $count=0;
if ($count > 4)
{
last
}
else
{
$count++;
}
there's several ways to do this
Here is one.. Incidentally, un
> Yes... CGI.pm would be a good place to start:
> http://search.cpan.org/~lds/CGI.pm-3.05/CGI.pm
I disagree. IMHO If you have C++ skills, you should
bypass CGI and head straight on to mod_perl using
"method handlers". These are Object oriented classes
that handle web requests.
Marty
8002 above it.
>
> I guess, it's correct. don't know why there is 00
> padding, but remove the zeros and I get 5.82
>
> Yours would be 5.85
>
>
> --- Martin Moss <[EMAIL PROTECTED]> wrote:
>
> > Is this normal?
> >
> > perl -e'pri
Is this normal?
perl -e'print $]."\n";system ("perl -v");'
5.008005
This is perl, v5.8.5 built for i686-linux
...
Marty
___ALL-NEW Yahoo! Messenger -
all new features - even more fun! http://uk.mess
All,
I've inherited some old code, and after moving it to a
perl 5.8.5 environment from a perl 5.6.1 environment,
I'm getting the following compilation error "Can't
multiply inherit %FIELDS".
Googling hasn't really helped me out much, I can't see
any fields being declared twice in the inheritance
If you can decide at command line time which type of
input to use, e.g. using | or a file, then why not
write your script to use GetOpts::Std
Then you can use the -w as usual, and create a new
switche (-f <$filename> for file) and no switch for
STDIN. Then in your script you can simply check for
t
solved it,
in 5.004 you must specify the brackets -
$self->$tag();
Marty
--- Martin Moss <[EMAIL PROTECTED]> wrote:
> All,
>
> I've got code thats being ported to a 5.004 (don't
> ask!!) environment.
> It works fine in 5.6, but I'm getting compila
All,
I've got code thats being ported to a 5.004 (don't
ask!!) environment.
It works fine in 5.6, but I'm getting compilation
errors on 5.004
The line is this:-
$self->$method_name;
Is this valid syntax in 5.004? If not, any ideas on
what to use instead?
Regards
Marty
All,
I'm trying to understand the Apache::DBI mechanism
which caches and returns $dbh handles. My concern is
that Apache DBI uses the connection options, like
AutoCommit=>1 as part of it's caching 'key' mechanism.
Thus would I be right in thinking that if I create a
$dbh with AutoCommit=>1, this
you could slurp the whoel file into one string and
then search that.
my $text;
{
local( $/ ) ; # Makes the entire file contents
be read in one go, by changing what perl recognises as
the line break char. see docs..
open (NEWFILE,"<$file") or die "Cannot open
file '$file'";
All,
I need to do some number formatting, so I can shorten
some rather large number strings.
1000,000,000 would become 1000m
Does anybody know of a cpan module to do this. I had a
look but couldn't find anything which did this.
Marty
urrently there aren't any show stopping
taint issues.
Hope this helps,
Marty
--- $Bill Luebkert <[EMAIL PROTECTED]> wrote:
> Martin Moss wrote:
>
> > Hey Bill, thanks for your input, but no, I was
> simply
> > meaning that the string of perl I was trying to
>
> > The format of the output hash I wish to write is:-
> >
> > $hash= {
> > 'key' => {
> > 'original_value'
> > =>$original_value',
> > 'new_value' =>
> '$original_value',
> >
> > 'files' => [
> >
Cheers James,
Couldn't see the wood for the trees!
It works great.
Marty
--- "vega, james" <[EMAIL PROTECTED]> wrote:
> > -Original Message-
> > From:
> [EMAIL PROTECTED]
> >
>
[mailto:[EMAIL PROTECTED]
> On
> > Behalf Of MA
All,
Hope everyone's having a pleasant day!
I have a really urgent problem which I just can't seem
to resolve.
I have a data structure, which I want to write out to
a file. The file I'd like to write would actually be a
perl file which I can 'require' at a later date, after
it's been manually ed
All,
I have found a curious issue with Constant Arrays.
In my code I have this:-
use constant PARENT_MENUS=>(
#'Admin::Entity',
);
and a subroutine:-
sub parent_menus
{
my $self=shift;
my $class=ref($self)||$self;
my @menu=();
eval
{
@menu=$class->PARENT_MENUS;
}
All,
I have a simple problem, and hopefully hteres a simple solution, or perhaps
I'm just barking mad.
package myclass::A;
use constant CONSTANT_ITEM=>'1';
package myclass::B;
#no constant defined
Outside of these two classes, I was wondering if it possible to do a check
which tells me if a
Rather than using crontab, which is pretty much a pull method, why not use a
perl daemon process - to use push?
my $error=0;
while ($error <1)
{
sleep 5;#or more just make sure you have a sleep in there
#&readdir
#&ftp files
#&delete files
#if (some error)
{
$
Earth to Brain!!
Sorry I think I temporarily forgot the 'sort' function,
Marty
- Original Message -
From: "Martin Moss" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Wednesday, June 04, 2003 9:04 PM
Subject: [Perl-unix-us
Hi All,
Wondering if anybody has an 'efficient' Hat on today?
I Have a Hash who's Key's are all 'Module Names'.
e.g.
Foo=>1
Foo::Bar=>1
Foo::Bar::Poo=>1
Foo::Beer=>1
Foo::Beer::Nuts=>1
Foo::Beer::Nuts::Hmmm=>1
Foo::Bar::AgainHmmm=>1
What I want to do is to turn this hash into a Hierarchical Has
[EMAIL PROTECTED]>;
"Perl-Unix-Users EE-mail"" <[EMAIL PROTECTED]>
Sent: Wednesday, April 02, 2003 5:37 PM
Subject: Re: [Perl-unix-users] memory issues
> From: "Martin Moss" <[EMAIL PROTECTED]>
> To: "Perl-Win32-Users \(E-m
Title: Secure FTP
All,
I was wondering if I could get clarification on
something.
I have a class object called $x.
What I want to do is pass this $x into objects
$y & $z, and store it internally
Thus:-
$y->{x}=$x;
$z->{x}=$x;
This Is ok, and shouldn't cause any problems.
However what
All,
I have a problem in that I want to check if a DBI
connection is still active.
For this I have heard you can use ping. But From
the documents I've found I see that ping is always set to return true for
DBD::mysql. But DBD::Oracle has a ping routine defined which does a valid check.
The
All,
When I dump a hash structure using 'x' on the perl debugger it looks like
this:-
0 HASH(0x8658db4)
'_load' => HASH(0x8ad6b00)
'PROCESSING' => 1
'STRUC' => HASH(0x8b56f94)
-> REUSED_ADDRESS
I am curious as to what REUSED_ADDRESS means? I am concerne
Whilst Net::Telnet is a groovy thing, Telnet isn't as secure as ssh.
I haven't had any use of the Net::SSH stuff out there, but perhaps it would
be a consideration,
Regards
Marty
- Original Message -
From: "Peter Eisengrein" <[EMAIL PROTECTED]>
To: "'Poon, Kelvin (Infomart)'" <[EMAIL PROT
t;[EMAIL PROTECTED]>
To: "Martin Moss" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Friday, January 10, 2003 7:09 PM
Subject: Re: [Perl-unix-users] listing subroutines defined locally in a
class
> take me off the list
>
> On Fri, 10
All,
I want to be able to take a class and in it's 'new'
subroutine do a check to ensure that each class has been given configuration
information for each subroutine it has defined locally within that class. The
problem I have is that I don't know how to differentiate between methods create
Title: RE: [Perl-unix-users] Help: Daemon Status
apologies, I cut and pasted my code from something
I'd already written, and the LOCKFILE bit is irrelevant.
Marty
- Original Message -
From:
Martin Moss
To: Mundell, R. (Ronald) ; '$Bill Luebkert'
Cc: [
Title: RE: [Perl-unix-users] Help: Daemon Status
Is it a general purpose process, or a custom
process, e.g. will any of us here have heard of it.
Does this process write log files?
Does it generate SNMP trap messages, Does the
process try to communicate with anything else?
At the end of th
Are you able to write the daemon as
well?
Or are you talking about writing a perl script to
monitor an already existing daemon?
You really need to give out more details to allow
us to give you an answer,
Regards
Marty
- Original Message -
From:
Mundell, R.
(Ronald)
All I am at a loss.
Possibly it's 2am and I can't see the wood for the trees, but this really
baffles me, in fact it is starting to annoy the heck outta me.
Below is a snippet of code, from a Multiplexer I have written to handle
URL's on the fly based upon database entires loaded in a module.
The
All,
Is anybody else getting reposts of my messages?
I wonder if BT internet is going mad,
Sorry,
Marty
- Original Message -
From: "Martin Moss" <[EMAIL PROTECTED]>
To: "Mark Breslauer" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>;
<[EMAIL PROTECTED
All,
Today I received unsubscription emails from activestate from all my
subscribed mailing lists. I just wondered if anybody else has had these in
the past.
Wondered if it was a glitch or if somebody is playing silly beggars,
Regards
Marty
___
Perl-
Google came up trumps eventually,
my $driver=dbh->{Driver}->{Name};
Regards
Marty
- Original Message -
From: "Martin Moss" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Sunday, August 25, 2002 5:24 PM
Subject: $dbh drivern
All,
I've been hunting through the docs but not found anything useful.
What I want to do is find out what the DriverName is for a $dbh connection.
e.g. the $driver that DBI used to create the $dbh connection.
ideally a method like this is what I'm after:-
my $database_driver=$dbh->driver_name();
contains the character which is causing this problem.
Or you could open the file as a binary fiile and use seek to navigate around
it.
Marty
- Original Message -
From: "Mark Breslauer" <[EMAIL PROTECTED]>
To: "'Martin Moss'" <[EMAIL PROTECTED]>; &qu
How big is the log file?
Have you exceeded the maximum size limit for a file?
Marty
- Original Message -
From: "Mark Breslauer" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Cc: "Mark Breslauer" <[EMAIL PROTECTED]>
Sent: Friday, August 16, 2002 3:16 PM
Subject: [Perl-un
> The only issue I have is I want to pass it the language locale on the fly?
> Is this possible?
DOH RTFM!
Tired need slp.
Cheers all,
Marty
___
Perl-Unix-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mai
Thats absolutely the problem I was trying to solve, and a great solution. It
doesn't look like there'd be issues with using it under perl 5.6?
The only issue I have is I want to pass it the language locale on the fly?
Is this possible?
Thanks Randy, you get the gold star award,
Kind regards
Mar
All,
Does anybody have any suggestion how the Directory structuring of Modules.
For instance I would like to support 3 languages.
Therefore I want 3 different versions of the same module, but each one
providing error messages and output in a specific language.
so perhaps:-
MyName::SubName1::F
Hi all,
Long time no see:-)
How are your significant others (wife, kids, girlfriends, pet goldfish)?
Anyway down to business.
Is there a method to check if a cookie has been tampered with?
I'd thought about encrypting my values, but then the encrypted values can be
copied into another cookie. I
recopy your file in ascii mode,
This will remove the ^M.
other wise the character you are looking for is a single character not '^' +
'M'
you can tell this in vi by scrolling your cursor across it, you'll note the
cursor moves two spaces.
Can't remember what the unix keyboard command is to produ
then
> using the exe through apache
>
>
>
>
> http://httpd.apache.org/docs/howto/cgi.html
>
> There shouldn't be a problem as long as Apache is
> configure to
>
> AddHandler cgi-script exe # for those pesty exe files
>
>
>
> --- Martin Moss <
> > modperl module?
> >
> > --- parvez <[EMAIL PROTECTED]> wrote:
> > > Hi,
> > > did u try using perlcc taht does it on
> > > Unix/Linux:
> > > USAGE is:
> > > perlcc
> > > /usr/bin/perlcc: Usage:
> > > /usr/
All,
I want to precompile a perl script into an exe, and then use those exe's
through apache as if they were normal .cgi .pl scripts.
Can this be done, and if so how?
Regards
Marty
___
Perl-Unix-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: ht
The ^M also occurs if you ftp an ascii file using Binary method..
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of
> Craig B. Nakata
> Sent: Wednesday 24 April 2002 06:24
> To: 'Nagesh Reddy'; [EMAIL PROTECTED]
> Subject: RE: [Perl-unix-users] ^M
Thanks Guys,
It looks like I need SIGCHLD & a little bit of waitpid,
Regards
Marty
> -Original Message-
> From: $Bill Luebkert [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday 10 April 2002 13:59
> To: Martin Moss
> Cc: Perl-Unix-Users
> Subject: Re: [Perl-unix-users
Ahhh,
sorry I didn't say, this would be on a Linux system.
Marty
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of
> tripix
> Sent: Wednesday 10 April 2002 12:58
> To: Martin Moss; Perl-Win32-Users (E-mail)
> Cc: Perl-U
All,
I wish to add forking to a script I wrote.
However I wish to ensure that only a configurable number of 'children' are
created.
forking is no problem,
Queuing up things to be forked I can do,
However is there an easy way to create a hard total, I was thinking the only
way is to have each fo
compare the timestamps of the file.
do an ftp 'ls -l' and record the timestamps.
do a significant pause, maybe 3 seconds and then check again. if the
timestamps match the file has probably (sorry it may hav bust) been
uploaded.
Regards
Marty
> -Original Message-
> From: [EMAIL PROTECTE
I've included the fixes below.
But basically when you refer to $date{index}
you are really talking about the hashkey 'index' of hash '%date'.
So at the beginning you should declare your hashes, you declared them as
strings.
e.g.
my %date; # this is a hash
not
my $date; # this is a string
#%
taType ,$colStartPos ,$colEndPos ,$colLength
> ,$colDataType
> ,$colDateFmt ,$colNumFmt );
>
> #Bind the variables to the sql statement.
> $sth->bind_columns( \($tagName ,$dataType ,$colStartPos ,$colEndPos
> ,$colLength ,$colDataType ,$colDateFmt ,$colNumFmt ));
>
> AND S
Daft question,
Is it possible to join databases without making two calls. I.e. can the join
be done within SQL, not using 2 $db references?
Not sure which databases yet, but probably mysql, oracle, postgreSQL.
Regards
Marty
___
Perl-Unix-Users maili
All,
As I'm trying to create system wide level platform (over 100 machines)
I need to be able to create my own internal CPAN mirror. But one which I can
selectively update from CPAN as an when new modules exist.
It would act as a way of ensuring all machines configured on my network get
their CP
All
When using CPAN::Shell->expand within a perl script to install modules
directly off CPAN, is there a way to force the install to 'follow'
prerequisite Modules?
Regards
Marty
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.Acti
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of
> [EMAIL PROTECTED]
> Sent: Wednesday 21 March 2001 16:30
> To: [EMAIL PROTECTED]
> Subject: RE: [Perl-unix-users] memory usage of perl processes
>
>
>
>
>
> >I guess you could use 'top' in a unix wind
$obj->install
}
}
Hmm Perhaps a little bit more patience is needed today:-)
Marty
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of
> Martin Moss
> Sent: Wednesday 21 March 2001 16:20
> To: [EMAIL PROTECTED]
> Sub
All,
I've devised the following script to check if a CPAN module is installed on
a machine, and install it if it isn't.
The only problem is, the eval always fails and says it can't find the
module, and thus always installs it.
Also if I use "use" instead of "Require" it gives me compilation errors
I guess you could use 'top' in a unix window.
Then kick off 1 drone only and look at the memory usage. Then * it by the
number of processes you expect.
55 is a lot of processes On Any unix system.
Perhaps you could stagger the number of processes. so maybe spawn 30 drones
and have each drone
Thanks very much to the useful advice I had from the two lists, here's the
current situation + code.
Having spent most of yesterday in debugging mode it looks like the culprit
is the MIME::Entity object.
This Object ($entity) is NOT being destroyed when it goes out of scope,
however I could not f
All,
I've got some code which is taking up too myuch memory over a period of
time. i.e. it starts with only a nominal percentage of memory use and over a
period of a few hours it builds up until it reaches a very high percentage,
%50 ish.
Anyway I was wondering if anybody could provide me some p
All,
On a linux box, I need to write a CGI script which will allow me to restart
an INN server.
The problem I have is that with the latest version of INN only the "news"
user can restart inn (most specifically only the news user can issue the
command 'inndstart')
How can I write a CGI script wh
All,
Has anybody had any experience of using perl scripts to backup machines?
I'm wondering if there's any modules aout there for communicating with
backup devices?
Regards
Marty
___
Perl-Unix-Users mailing list. To unsubscribe go to
http://listser
I wish to write an installation script which will accompany a new module
I've written,
It must install the new module, and then check for the presence of some
other "inhouse" written modules. If these modules aren't installed on that
machine the script will go away and install them. Ideally I'd li
essage-----
> From: Philip Newton [mailto:[EMAIL PROTECTED]]
> Sent: Monday 08 January 2001 13:16
> To: 'Martin Moss'
> Cc: [EMAIL PROTECTED];
> [EMAIL PROTECTED]
> Subject: Re: Callbacks?
>
>
> Martin Moss wrote:
> > how can I tell that the reference I
Thanks for the input guys,
one final question, how can I tell that the reference I've been given is
actually a reference to a subroutine?
Marty
> >
> > @results=&$myfuncref($param1,$parma2,);
>
> Alternate syntax:
>
> @results = $myfuncref->($param1, $param2, ...);
>
> I prefer the lat
All,
I'm trying to write a callback process in a script I'm writing.
Basically I have a reference to a subroutine, and I want to execute that
subroutine and pass it some parameters,
Can somebody point me in the right direction?
Regards
Marty
___
Per
Hi,
I don't know about the perl course, but I've done a couple of other unix
based courses at HP's Pinewood training centre in Bracknell UK, and was
impressed with the quality of the classroom,equiment and teaching.
don't know about going on a course to learn perl. Buy a couple of books and
get
Hi
all,
Anybody know of a guarenteed method of getting a full hostname &
domain name of a unix box.
Hostname() just returns bilbo.
I need
bilbo.x.com
Any
ideas?
Marty
79 matches
Mail list logo