i am new to perl modules (well, any perl more advanced than CGI business).
i have made a module that returns a hash reference (the hash is a hash of
a hash, populated by $outer{$inner} = { a=>b, c=>d }). when i use a sort
subroutine ({ $a->{'field'} <=> $b->{'field'}) on a hash in its module,
the
On Aug 17, Daniel Falkenberg said:
>called too early to check prototype at
>/usr/lib/perl5/site_perl/5.6.0/GD/Graph/Map.pm line 366
All standard error messages can be explained by looking in the perldiag
documentation, or by including 'use diagnostics' in your program, or by
piping the error mes
Yes, and it is quite easy. You do need an access file to exist first, but
once that exists, you can add tables and indexes, insert, update, delete
select and anything else you might think of to do with it.
You need the DBI module, and the DBD::ODBC module. Perldoc DBI will tell you
how the DBI an
> Hi
>
> I was wondering if there was a way to use perl to add/modify an access
> database.
>
> If so where can i find some info on how to do this
>
> Regards,
>
> Allan
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
List,
I have always wondered what this error actually means. Would it be
possible for some one to give me a quick run down on what is happeneing
when the error occures? I am really interested in the called to early
part of the line...
called too early to check prototype at
/usr/lib/perl5/site_
I believe that you may need to add an ampersand "&" before the name of the
subroutine, like so:
if(!&isPresent(\$req, $user))
Randy
"David Simcik" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Newbie question here...
>
> I've created a CGI.pm object and want
Hi,
I am using ActiveState Perl 5.6 on Windows NT 4.0. I want to use package
DBD::Oracle to access the database. I downloaded the required .ppd file. When
installing it I got message that it is not intended for this build of Perl
(MSWin32-x86-multi-thread'.
There is also another tar.gz.
Pat:
We've fixed the problem in the TC with Java based web pages.
--
Kolene Isbell
Information Systems
Kolene Isbell wrote:
> We could not find a problem with any of the games on #24. Please let us know if it
> happens again.
>
> The problem on #18 is occurring on all the PCs in the training
SET HEADING OFF PAGESIZE 0 FEEDBACK OFF
This will output only the result of 513
Jose A. Torres
BUCS Global Production Support
(212) 670-3879 - Office
(800) 774-4156 - Pager
(914) 632-4630 - Home
> -Original Message-
> From: Yacketta, Ronald [SMTP:[EMAIL PROTECTED]]
> Sent: Thursday, Au
--- "Yacketta, Ronald" <[EMAIL PROTECTED]> wrote:
> ok, then why does this only print the 1 in 19?
>
> #!/usr/bin/perl -w
>
>
> my $session = qx(
> sqlplus -S rtdiag/*\@DBNAME <<-!
> SET HEA OFF;
> select count(*) from session_list;
> quit
> !
> );
> #rem leading carrage returns
> $ses
how does one save jpg's to MySql using PERL?
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
ok, then why does this only print the 1 in 19?
#!/usr/bin/perl -w
my $session = qx(
sqlplus -S rtdiag/*\@DBNAME <<-!
SET HEA OFF;
select count(*) from session_list;
quit
!
);
#rem leading carrage returns
$session =~ tr/^\n//;
#rem leading spaces
$session =~ s/^\s+//;
#get the error if
Gibbs Tanton - tgibbs [[EMAIL PROTECTED]] quoth:
*> Here is one way to get what you want:
*>
*>our @ISA = qw(Exporter);
*>our @EXPORT = ();
*>our @EXPORT_OK = qw(myfunc);
Just to point this out since the other examples had a subtle yet important
difference that Gibbs got right.
DO NOT USE @EXPOR
At 08:51 AM 08/17/2001 +0930, Daniel Falkenberg wrote:
>Dear list,
>
>Has any one here worked with Perl and HTML to draw graphs on a web page?
>Is there a module I can use to write these graphs. I am im very
>unfamilier ground here. Any ideas or input would be greatly
>appriciated.
Use GD::Grap
Dear list,
Has any one here worked with Perl and HTML to draw graphs on a web page?
Is there a module I can use to write these graphs. I am im very
unfamilier ground here. Any ideas or input would be greatly
appriciated.
For everyone that wants to see some code :)...
sub statistics{
my $sth
Hi Jon,
On Thu, Aug 16, 2001 at 03:52:59PM -0700, Jon ([EMAIL PROTECTED]) spew-ed forth:
> Hello,
>
> I am signing up for a class at the U.W. that requires that I have one to
> two years programming experience in a high level language. Here are my
> questions:
>
> Is Perl a high level langua
On Thu, Aug 16, 2001 at 03:52:59PM -0700, Jon wrote:
> Is Perl a high level language?
Yes.
> What is a high level language?
One in which the language is abtracted away from the underlying
hardware. For example, assembly language is low level, C is generally
considered high level, and Perl is
These questions are always fun because their answers are so subjective!
> Is Perl a high level language?
I'd say so.
> What is a high level language?
I would say anything that doesn't require you to do memory management.
Luke
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional com
Folks,
I am loosing it today, for some odd reason I am banging my head against the
wall trying to
parse some sql output.
I have the following output:
SQL>
COUNT(*)
--
513
I just need the # in a variable (513)
could someone slap me silly for some help here?
Regards,
Ron
--
Finally got ppm to do more than sneer at me, by cd'ing to \perl\bin. When I
try to do anything else, like search, search Net::SMTP, install Net::SMTP,
it just says:
not well-formed at line 1, column 17, byte 17 at
C:/Perl/site/lib/SOAP/Parser.pm
line 73
and crashes.
Sigh.
jj
John Thayer Jen
Thanks. I tried to find it on CPAN and failed, but I'll look where you
said. I tried ppm, as Wagner-David said, and couldn't make ppm work either
:-( It returns:
C:\tmp>c:\perl\bin\ppm.bat
Can't locate PPM.pm in @INC (@INC contains: C:/tmp/lib .) at c:\pe
line 21.
BEGIN failed--compilation ab
--- "Jensen, John T" <[EMAIL PROTECTED]> wrote:
> I have installed Active PERL 5.6 on two machines here, one NT4, one W2K. I
> want to use the Net:SMTP module, which is nicely described in the help
> files, but the module itself is not there in either installation. Can
> anyone help me here?
>
Paul makes a good point...normally, you don't want to do what I just
proposed...take a look at Config::General;
my $obj = new Config::General( -LowerCaseNames => 1, -file => $filename,
-AllowMultiOptions => 0 );
It usues a hash to handle passing in arguments in the constructor. If you
are not
Use ppm to install one or both of the modules. Then in the doc
associated with AS, you will find information on how to use the modules.
Wags ;)
-Original Message-
From: Jensen, John T [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 16, 2001 14:11
To: Wagner-David
Cc: '[EMAIL P
Here is one way to get what you want:
#!/usr/local/perl
use warnings;
use strict;
use mymodule qw(-d -f=MyFileName.dat myfunc);
print "Hellon";
myfunc();
#end main file#
#start mymodule file#
package mymodule;
use strict;
use Exporter;
our @ISA = qw(Exporter);
our @EXPORT = ()
Thanks, but I'm not sure what this means that I should do. The module is
certainly not on either of my machines.
jj
John Thayer Jensen, System Administrator
Commerce Computing, University of Auckland
-Original Message-
From: Wagner-David [mailto:[EMAIL PROTECTED]]
Sent: Friday, 1
--- "F.H" <[EMAIL PROTECTED]> wrote:
> what I mean by argument is a switch/option that I pass to the module that I call
>whithin my main
> perl script. Yes I have those line in my module:
> >use vars qw( @EXPORT, @ISA );
> >@EXPORT = qw( function_name );
> >@ISA = qw( Exporter );
> >require Expor
I used ppm to find:
NetServer-SMTP [0.01] basic SMTP server class for Perl
SMTP-Server[1.1 ] A native Perl SMTP Server implementation for Perl.
Wags ;)
-Original Message-
From: Jensen, John T [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 16, 2001 13:53
To: '[EMAIL PROTEC
On Thu, Aug 16, 2001 at 04:52:09PM -0400, F.H wrote:
> what I mean by argument is a switch/option that I pass to the module that I call
>whithin my main perl script. Yes I have those line in my module:
> >use vars qw( @EXPORT, @ISA );
> >@EXPORT = qw( function_name );
> >@ISA = qw( Exporter );
>
I have installed Active PERL 5.6 on two machines here, one NT4, one W2K. I
want to use the Net:SMTP module, which is nicely described in the help
files, but the module itself is not there in either installation. Can
anyone help me here?
jj
John Thayer Jensen, System Administrator
Commerce Comp
I meant to send this to the whole list.
__
Your favorite stores, helpful shopping tools and great gift ideas. Experience the
convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/
Get your own FREE, personal
what I mean by argument is a switch/option that I pass to the module that I call
whithin my main perl script. Yes I have those line in my module:
>use vars qw( @EXPORT, @ISA );
>@EXPORT = qw( function_name );
>@ISA = qw( Exporter );
>require Exporter
the module is so long that is not worth postin
--- Curtis Poe <[EMAIL PROTECTED]> wrote:
>
> package CGI::Safe;
>
> $VERSION = 1.0;
> use strict;
> use Exporter;
> use vars qw/ @ISA @EXPORT_OK /;
> @ISA = qw/ CGI Exporter /;
> @EXPOR
--- "F.H" <[EMAIL PROTECTED]> wrote:
> Hi there,
> Can you use in a perl script a module with an argument. something like
> use mymodule -myargument;
Why yes, you can use a module with an argument. Why, just the other day I yelled at
one of my
coworkers "use DBI.pm, you fool!" :)
> I get this
On Thursday 16 August 2001 16:16, F.H wrote:
> Hi there,
> Can you use in a perl script a module with an argument. something like
> use mymodule -myargument;
>
> I get this message: "-myargument" is not exported bt the mymodule module.
> I tried in the module this
> @mymodule::EXPORT = qw(myargume
Hi there,
Can you use in a perl script a module with an argument. something like
use mymodule -myargument;
I get this message: "-myargument" is not exported bt the mymodule module.
I tried in the module this
@mymodule::EXPORT = qw(myargument )
and still it didn't work.
I'd appreciate any suggest
You could also use -d on the actual name of the directory to see if it
exists before you try to create it.
my $dir="foo";
mkdir 'foo', 0744 unless (-d $dir);
HTH
-dave
On Thu, 16 Aug 2001 14:20:34 -0500, David Simcik wrote:
>Hey folks,
> This would seem to be a trivial thing, but I can'
I used the following where $loc held a directory( depending on where you
are in the code, you may need the name to be fully qualified):
if ( ! -e $loc) {
mkdir("${loc}",0666) || die "${prog}Unable to create directory
${loc}";
}
Wags ;)
-Original Message-
Fr
Hey folks,
This would seem to be a trivial thing, but I can't find a great answer
anywhere for it. I want to do a mkdir, but before I do, I want to confirm
that the dir I'm about to make doesn't already exist.
Would the -X operators (particularily -e) work with DIRHANDLES??? That would
ce
> foreach $key (keys %hash) {
> print $key\n;
> print $hash{$key}."\n";
> }
print @{ $hash{$key} }, "\n";
this will print the contents of the array separated by a space character.
you can loop over the @{ $hash{$key} } array to print out individual
elements:
for (@{ $hash{$key} })
{
pr
NAME
beginners-faq - FAQ for the beginners mailing list
1 - Administriva
1.1 - I'm not subscribed - how do I subscribe?
Send mail to <[EMAIL PROTECTED]>
You can also specify your subscription email address by sending email to
(assuming [EMAIL PROTECTED] is your email address)
I have a hash and the 'value' associated with each key is an array of
strings.
(I do not care the strings are in order, so I suppose an embedded hash
would do too);
I want to print out the keys and each element of the array that
associated with each key
I did:
foreach $key (keys %hash) {
pri
Wothout code and the format of the log file I can only suggest this ... others
might have other ideas ..
You could read in the line and try to split on the line to put the list
elements into a hash ... the key of hte hash would be the converted time/date
stamp in epoch then you can loop thro
$req is already a reference but you called isPresent using the following
syntax
isPresent(\$req,$user) # Wrong
instead of
isPresent($req,$user) # Correct
On Thu, Aug 16, 2001 at 11:32:39AM -0500, David Simcik shaped the electrons to read:
> Newbie question here...
>
> I've
Peter/All;
Is this what you had in mind, offered as a suggestion?
if ($test = /($regex)/o) {
SWITCH: for ($test){
if ( $test =~ /Communication/ ) {
$results{$test}++ if ( $_ =~ /$test/ && $_ =~
/failure/);
last SWITCH;
Hello Jose,
i think u can use
$hashref = $dbh->selectall_hashref("select.);
perdoc dbi to find more :)
neeraj
Friday, August 17, 2001, 12:02:14 AM, you wrote:
TJCFS> How do I populate a Hash array with 3 fields from the result of an sql
statement.
TJCFS> (i.e. SELECT ORIGIN, DEPT,
--- David Simcik <[EMAIL PROTECTED]> wrote:
> Newbie question here...
>
> I've created a CGI.pm object and want to pass its reference to a function.
> It keeps on puking though, returning this message:
David,
First bit of advice: don't use prototypes.
http://www.perl.com/pub/a/language/misc/
Hello list,
How should I go about setting a timeout for a section of code? I've
written some code to do a whois on a few hosts. Sometimes, it stay's on
one host for a few minutes, trying to connect to the whois server.
Here's the code:
foreach my $h(@list) {
my $result = `whois $h`;
}
How do I populate a Hash array with 3 fields from the result of an sql statement.
(i.e. SELECT ORIGIN, DEPT, COUNT(*) FROM TBL WHERE DATE= GROUP BY ORIGIN, DEPT
Any ideas are appreciated.
Thanks
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECT
Hi,
I am new with Perl
if someone can help me out
I wrote a script which reads two files and compares them and then prints out
what is missing
but since the txt files are kind of log files they have time and date column
in it
what i want is to out put only 2 hours old log after comparing
how can i
On Aug 16, David Simcik said:
>Type of arg 1 to main::isPresent must be scalar (not single ref constructor)
>at C:\src\Orion\cgi-bin\share.pl line 45, near "$user)"
A prototype of \$ means that Perl will add the \ for you automagically.
>sub isPresent(\$$);
>
>if(!isPresent(\$req, $user))
You
depending on what you want, you could use the Win32::* modules (standard
with active state perl, else get them from cpan)
or use a system call if they dont do what you want...
if you have a more precise question, feel free to ask, but i'm nto sure what
extra advice to give you now =)
regards,
J
ok, i'm not 100% sure what you're doing here..
the object CGI.pm returns is a hash reference... so what your'e doing here
is passing a reference to a hashreference.
why?
secondly, you're prototyping your subroutine... altho it has it's use in
some cases, most of the time this is NOT what you wan
Hello all,
i need to get some system data from Windows 2000 as number of currently
opened sockets, running threads, handles and processes - what is the best
way to do it?
Thanks.
Daniel.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Newbie question here...
I've created a CGI.pm object and want to pass its reference to a function.
It keeps on puking though, returning this message:
Type of arg 1 to main::isPresent must be scalar (not single ref constructor)
at C:\src\Orion\cgi-bin\share.pl line 45, near "$user)"
Basically, I
On Aug 16, Michel Rodriguez said:
>On Thursday 16 August 2001 1:57 pm, Joe Bellifont wrote:
>
>> the code you provided below produces an error at the "foreach" line.
>> --syntax error at line 12 , near "$field qw( FNAME SURNAME QDETAILS)"
>
>...
>> use Data::Denter;# just to check
Thanks Steven,
Sorry about the missing code and program exposition. Please see my "A Variant
on the Recursive Copy - Funny Problem thread".
Best regards.
Vincent Lim
Steve Howard wrote:
> It might be helpful if you posted at least the part of the code that is
> having trouble. it's difficult
Hello All,
I am currently developing a script on Perl 5.001 in Windows 2000 but
targeted for WIndows NT 4.0. I have scan through the list and seen the
answer on File::*. Unfortunately, the perl version I have does not have
the FIle::Path module (or is it?).
Here's the purpose of my script. Th
Hi
I'm trying to pipe a grep to an outfile.
The grep function works ok
@sc=grep /win|net/, @NIC
However, I would like to insert a couple of lines before the file starts
to log all occurrences containing net without using separate grep
commands.
All help appreciated
Toni
> -Original Message-
> From: Frank Wu [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, August 15, 2001 10:53 PM
> To: [EMAIL PROTECTED]
> Subject: cgi & syslog
>
>
> Hi all,
>
> I'm writing a simple perl cgi script to populate some
> infomation from syslog
> file,
>
> open FILE, "
On Thursday 16 August 2001 1:57 pm, Joe Bellifont wrote:
> the code you provided below produces an error at the "foreach" line.
> --syntax error at line 12 , near "$field qw( FNAME SURNAME QDETAILS)"
...
> use Data::Denter;# just to check what's read in by
> XML::Simple
This XML
\D = non numbers
\d = numbers
perldoc perlre
or an online tutorial about regexes at
http://japh.nu/index.cgi?base=tuts
hth,
Jos
- Original Message -
From: "Steve Howard" <[EMAIL PROTECTED]>
To: "Toby Stuart" <[EMAIL PROTECTED]>
Cc: "Beginners@Perl. Org" <[EMAIL PROTECTED]>
Sent: Thursd
The \D switch takes out everything that IS a number. Was the original
question not that this person wanted to take out everything was IS NOT a
number?
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of
Toby Stuart
Sent: Wednesday, August 15, 2001 11:52 PM
To
hi,
the code you provided below produces an error at the "foreach" line.
--syntax error at line 12 , near "$field qw( FNAME SURNAME QDETAILS)"
any ideas?
thanks,
-J
#!/bin/perl -w
use strict;
use XML::Simple;# depends on XML::Parser
use Data::Denter;# just to
Thanks for your reply, Peter. I think I didn't label
my packages clearly for you, which likely makes a big
difference ;-) If this tidbit changes your reply, let
me know. Sorry about this, and thanks again!
> The B in your code uses an X to connect, not A.
> Perhaps you're eliding too
> much inf
Hi all,
I am having quite some problems with this, so perhaps someone could
point me in the right direction.
I am using Joe Marzots' SNMP 4.2.0 module.
Here is my code thus far.
$var = new SNMP::Varbind([$devtypes{$mydev}{$object}]);
print ("Length of \$var\-\>[2] is " . length ($var->[2
use: 'perl -MMODULE_NAME -e 1' for an individual module, like:
perl -MFile::Copy -e 1, or perl -MCGI -e 1.
For all the modules installed, you might want to check out the following
URL:
http:[EMAIL PROTECTED]/msg04057.html
Ron
>From: "Joe Bellifont" <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
At this site excluding shipping and handling "Learning Perl 3rd
Edition" costs $20.50
http://www.bookpool.com/.x/n5qthihx78/ss/1?qs=Learning+Perl+3rd+editio
n&Go.x=9&Go.y=13
>I' m afraid i can't aford that book or any such book-i tried every single
>store and here's the big problem:almost all
I'm writing a CGI script that returns PNG graphs (using GD and GD::Graph)
based on database queries, and everything works great so far except for
this one annoying bug...
I have a subroutine which generates a text string on the GD canvas. You can
pass it an argument that sets the fontsize for the
69 matches
Mail list logo