Okay, so I'm a total Perl newbie. I have an old script (that I
unfortunately inherited) that I'd like to convert to Perl 5. I copied
it over, and I get a syntax error. I went to perl.org, perl.com, etc.,
but can't find anything that describes the differences between 4 and 5.
I feel like I
Harry Putnam <[EMAIL PROTECTED]> wrote:
> "Shishir K. Singh" <[EMAIL PROTECTED]> writes:
>
>>>I've been pounding perldoc for a while this morning trying to
>>>find a clear technique described to add directories to @INC
>>>(permanently).
>>
>>>I'm sure its described somewhere but I'm not finding
"Learn Perl" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi guys,
>
> just wondering how to establish a DBI connection from a unix machine to a
> WINNT machine running MS SQL server? do I have to specify an OBDC?
I think you can do it as usually.
For exam
on Thu, 01 Aug 2002 22:10:41 GMT, [EMAIL PROTECTED] (Robert
Larmon) wrote:
> Okay, so I'm a total Perl newbie. I have an old script (that I
> unfortunately inherited) that I'd like to convert to Perl 5. I
> copied it over, and I get a syntax error. I went to perl.org,
> perl.com, etc., but c
Ummm...Are you sure that isn't C?
-Original Message-
From: Robert Larmon
To: [EMAIL PROTECTED]
Sent: 8/1/02 3:10 PM
Subject: newbie syntax error - Perl 4 -> Perl 5.6.1
Okay, so I'm a total Perl newbie. I have an old script (that I
unfortunately inherited) that I'd like to convert to
Hi All
Anyone no if there is a way of getting ActiveState's perl to handle complex
numbers?
The ActiveState home page has info on Math::Cephes::Complex but when I use
ppm3 to try and find this
Nothing...
Any other suggestions or work-arounds that others have used?
Cheers
James
=-=-=-=-=-=-=-=
on Fri, 02 Aug 2002 11:20:41 GMT, [EMAIL PROTECTED] (James
Campbell) wrote:
> Anyone no if there is a way of getting ActiveState's perl to
> handle complex numbers?
>
> The ActiveState home page has info on Math::Cephes::Complex but
> when I use ppm3 to try and find this
>
> Nothing...
>
> An
On Thursday, August 1, 2002, at 11:08 , Paul Tremblay wrote:
[..]
> Certainly, a perl script would be easier to maintain and debug.
>
> Thoughs on how C, java, and perl compare on speed?
I think what you are running into here is that
'c' as is, was not built to do 'regular expression'
work - as
From: Harry Putnam <[EMAIL PROTECTED]>
> "Jenda Krynicky" <[EMAIL PROTECTED]> writes:
>
> >> I've been pounding perldoc for a while this morning trying to find
> >> a clear technique described to add directories to @INC
> >> (permanently).
> >>
> >> I'm sure its described somewhere but I'm not f
personally I don't do speed while writing perl. I tend to break many keys.
The views and opinions expressed in this email message are the sender's
own, and do not necessarily represent the views and
If you are interested in language benchmarks you might want to check out
the "Great Computer Language Shootout":
http://www.bagley.org/~doug/shootout/
It has some surprising results.
Enjoy,
On Fri, 2002-08-02 at 01:08, Paul Tremblay wrote:
> This question may be too vague for a good answer, bu
From: Paul Tremblay <[EMAIL PROTECTED]>
> This question may be too vague for a good answer, but my curiosity
> makes me ask it anyway. I thought I read somewhere that perl is
> actually faster than C for certain tasks. The vagueness of the
> question probably lies in exactly what task, who writes
> -Original Message-
> From: learn perl [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, August 01, 2002 5:33 PM
> To: [EMAIL PROTECTED]
> Subject: How to create DBI connection on unix to MS SQL server ?
>
>
> Hi guys,
>
> just wondering how to establish a DBI connection from a unix
> mach
From: "Vitaliy Babiy" <[EMAIL PROTECTED]>
> "Learn Perl" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Hi guys, > > just wondering how to establish a DBI connection from a
> unix machine to a > WINNT machine running MS SQL server? do I have to
> specify an
SQLXML way:
SQLXML (currently at version 3.0) allows you to set up IIS Virtual
Directories that act as 'gateways' to a SQL Server 2000 database using
a given login and password. You can then send queries to the database
in various formats and SQL Server will return the results in XML.
http://you
Hello,
Ok, I made a newbie mistake and I hope I don't have to go back and
change my code.
I wrote a script that talks to a Mysql database. I created a table
called hostname.
I created a subroutine to send email messages when that is any errors as
well as log them to the db.
Problem is
is there a possiblity like on a router cisco to connect to a nortel boxe?
Thanks
Pierre
_
Send and receive Hotmail on your mobile device: http://mobile.msn.com
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional comma
On Fri, 2 Aug 2002, Jenda Krynicky wrote:
>
> Computing power is cheap, programmers' time is expensive!
>
Yes, but the programmer's time is only used once.
CPU cycles are used again and again and again ...
The cost of inefficient programs is cumulative and results
in increasing all the i
> Anyone no if there is a way of getting ActiveState's perl to
> handle complex numbers?
Does the 'Math::Complex' module, which is part of any standard Perl
distribution and which should already be on your harddisk, not suit
your needs?
--
Hi,
I have a subroutine that grabs a parameter (city) from the url for use in
the script (which produces a report with the value of that parameter). I now
want to grab another parameter (state) and append it to the previous and
have it also appear in the report. Preferably it would look like this
I have these coming up when creating a report:
ma, BC: 1
bost, : 1
Montroyal, QC: 1
waltam, MA: 1
Quebec, QC: 1
booger, MA: 1
Franklinxxx, MA: 1
BOSTI, MA: 1
How do I rid the report of these boxes?
--
-Larry
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mai
Hi, I have the attached problem with a PERL program. I'm trying to read
a cookie from an ASP page.
If anyone have any idea, it will be really appreciated.-
Pablo.-
--- Begin Message ---
Use of uninitialized value in index at ./outlook-grabber.pl line 232.
Use of uninitialized value in subst
well you did not supply much information here, but i have seen those
before, and it usually a chomp or chop in the right place(s) of the routine
that spins the data does the trick
> -Original Message-
> From: Larry Steinberg [mailto:[EMAIL PROTECTED]]
> Sent: Friday, August 02, 2002 11:
How are you creating the report?
If you are using some sort of print statement, what does it look like?
Where is the data coming from?
The boxes are non-printing characters of some sort. If you know that you
are only going to use a small set of printable characters, you could
probably create a
> -Original Message-
> From: Larry Steinberg [mailto:[EMAIL PROTECTED]]
> Sent: Friday, August 02, 2002 11:38 AM
> To: [EMAIL PROTECTED]
> Subject: grab another param from url
>
>
> Hi,
>
> I have a subroutine that grabs a parameter (city) from the url for use in
> the script (which pro
On Friday, August 2, 2002, at 08:09 , Chad Kellerman wrote:
[..]
> ** I always have issues with scope Can I use Sys::Hostname just in
> the subroutine, or any perl module for that matter? Or do I have to use
> it globally?
>
> $host=hostname; finds that daggone hostname and I have hostname
Hi,
I know how to take a given date and turn it into the number of seconds
since the epoch, but I can't figure out how to take a date in this form
and turn it back into a human-friendly format. I have looked around the
date::manip and date::calc modules but don't seem to see anything that
specifi
On Friday, August 2, 2002, at 08:36 , Dennis G. Wicks wrote:
> On Fri, 2 Aug 2002, Jenda Krynicky wrote:
>
>> Computing power is cheap, programmers' time is expensive!
[..]
> The cost of inefficient programs is cumulative and results
> in increasing all the infrastructure costs because of th
perldoc -f localtime
You don't need to install a module, it's built into Perl.
-Original Message-
From: Alan Hogue [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 02, 2002 10:00 AM
To: perl
Subject: Converting dates from seconds since epoch into regular form
Hi,
I know how to take a
You should pick up a freeware hex editor (there are a few of them on the
net, I've been using xvi32) and find out what the hex value of the
non-printable characters are, then you can create a regex to strip them out.
-Original Message-
From: Mark Anderson [mailto:[EMAIL PROTECTED]]
Sent:
I'm not sure if this is a problem with Getopt::Std or if it's just me, but
I'm having some issues getting this to cooperate:
use Getopt::Std;
my %OPT = ();
getopt('dhnt:', \%OPT);
and later...
if (exists($OPT{'h'})) {
## print usage and exit...
If I call my script with ./myscript.p
What? you mean maintainable, effective code is ruining the economy? This is
a joke right?
Microsoft follows this idea, but they really are in it just for the money
and nothing else, and that is ruining our economy.
Microsoft idealogy:
1. Write it well enough to be easy to use.
2. get everyone on
On Fri, Aug 02, 2002 at 01:32:52PM -0400, [EMAIL PROTECTED] wrote:
> I'm not sure if this is a problem with Getopt::Std or if it's just me, but
> I'm having some issues getting this to cooperate:
>
> use Getopt::Std;
> my %OPT = ();
> getopt('dhnt:', \%OPT);
Oops, looks like I have to use getopt
you're specifying that -n takes an argument, but then passing it none,
so it's interpreting the trailing -h as such,
On Friday, August 2, 2002, at 01:32 PM, [EMAIL PROTECTED] wrote:
> I'm not sure if this is a problem with Getopt::Std or if it's just me,
> but
> I'm having some issues getting
i've just installed MIMEBase64 in a non-standard directory (vhosted). The
problem is when I next try to install URI, i get the message:
perl Makefile.PL LIB=~/lib/perl5 PREFIX=~/lib/perl5 INC=~/lib/perl5
Warning: prerequisite MIME::Base64 failed to load: Can't locate
MIME/Base64.pm in @INC (@INC
Yeah, sorry. Here's the sub.
#the boxes appear right after the comma after tPara, in the bottom block
(where tPara is the city and sPara is the state).
sub parseUrl {
$nPara = $tPara = "";
($nPara) = ( $line =~ /[\?&]N=([^&\s]+)/i );
if ($nPara ne "") { $nPara = unpack_clean($nPar
I just looked at the file with vi and the character is a combination
circumflex backslash. I'll give it a shot trying to prevent them with regex.
"Timothy Johnson" <[EMAIL PROTECTED]> wrote in message
C0FD5BECE2F0C84EAA97D7300A500D50046DC9E4@SMILEY">news:C0FD5BECE2F0C84EAA97D7300A500D50046DC9E4@S
That was my previous message but i didn't write my question:
how do i include "~/lib/perl" to the @INC environment variable?
On Fri, 2 Aug 2002, RaymondMoran wrote:
> Date: Fri, 2 Aug 2002 17:37:58 + (UTC)
> From: RaymondMoran <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: module in
On Friday, August 2, 2002, at 10:59 , RaymondMoran wrote:
> That was my previous message but i didn't write my question:
>
> how do i include "~/lib/perl" to the @INC environment variable?
based upon what I just noticed in
perldoc perlrun
you might want to think in terms of
p
On Friday, August 2, 2002, at 10:23 , Nikola Janceski wrote:
[..]
> the Microsoft idea is good for games and NON-CRITICAL systems.
> but you would want reliablity for critical things.
[..]
I presume that you then disapprove of NT based
weapons systems and avionics packages - and
consider the ide
So now I've set the PERL5LIB and the PERLLIB variable. I include the -I
variable:
perl -I"~/lib/perl5" Makefile.PL LIB=~/lib/perl5 PREFIX=~/lib/perl5
Warning: prerequisite MIME::Base64 failed to load: Can't locate
MIME/Base64.pm in @INC (@INC contains:
/usr/pkg/lib/perl5/5.6.1/alpha-netbsd /usr
correct that I disapprove of NT based weapons systems.
Remember "Wargames" the movie? They couldn't shutdown
WOPR in NORAD because the silos would carry out their
final orders.
"Incoming bogie, Colonel."
"Defcon 1. Ready silos for launch sequence."
"Sorry Colonel, my bad, it was just my new Wind
On Friday, August 2, 2002, at 11:27 , RaymondMoran wrote:
> So now I've set the PERL5LIB and the PERLLIB variable. I include the -I
> variable:
>
> perl -I"~/lib/perl5" Makefile.PL LIB=~/lib/perl5 PREFIX=~/lib/perl5
> Warning: prerequisite MIME::Base64 failed to load: Can't locate
> MIME/Base64
on Fri, 02 Aug 2002 20:29:46 GMT, Drieux wrote:
> ### #!/usr/bin/perl -w
> ### use strict;
>
> [...some code snipped...]
>
> ### system($cmd);
> ### #system("make test");
> ### #system("make install");
> ###
But this code doesn't do anything ;-)
--
felix
--
To unsubscribe, e-mail: [EMAIL PR
Larry Steinberg wrote at Fri, 02 Aug 2002 19:12:06 +0200:
> sub parseUrl {
There are modules parsing urls.
E.g.:
use CGI qw/:standard/;
$q = CGI->new("key=value&blank=%20");
use Data::Dumper;
print Dumper(\{$q->Vars})
Cheerio,
Janek
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For addit
Thanks. I'll give it a shot - Monday. 8-)
"Janek Schleicher" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Larry Steinberg wrote at Fri, 02 Aug 2002 19:12:06 +0200:
>
> > sub parseUrl {
>
> There are modules parsing urls.
> E.g.:
>
> use CGI qw/:standard/;
>
thanks for your input. it works now.
On Fri, 2 Aug 2002, drieux wrote:
> Date: Fri, 2 Aug 2002 13:29:46 -0700
> From: drieux <[EMAIL PROTECTED]>
> To: begin begin <[EMAIL PROTECTED]>
> Subject: Re: module installation cant find dependencies
>
>
> On Friday, August 2, 2002, at 11:27 , RaymondMo
Hi.
My Redhat 7.2 installation had perl 5.6 installed by default,
/usr/lib/perl5/5.6.0
While in CPAN, installing a module, it went into the perl5.8.0
installation, and everything seemed well.
# perl -v
This is perl, v5.8.0 built for i686-linux
Copyright 1987-2002, Larry Wall
..
..
..
I've sin
It sounds like you need to reinstall Perl 5.8.0
-Original Message-
From: Gene McCullough [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 02, 2002 2:57 PM
To: [EMAIL PROTECTED]
Subject: Upgraded to 5.8 problems
Hi.
My Redhat 7.2 installation had perl 5.6 installed by default,
/usr/lib/
"Second, if one is on contract, Perl can be Very useful
for earning money. Read the report program below and
keep in mind that 'cad.passwd' is 11,000 lines of text
and 'simplex.passwd' is more than 300.
#! /usr/local/bin/perl
open (CAD, "cad.passwd");
while () {
volks,
here's a really DUMB question
but I consider perl's "hash" to be one of
the two or three critical features - the
other one is clearly the RegEx stuff that
allow you the power of sed/awk but without
having to fork the child to do that...
the question then of course is whether the
ab
On Friday, August 2, 2002, at 02:57 , Gene McCullough wrote:
[..]
> # perl -v
> This is perl, v5.8.0 built for i686-linux
>
> Copyright 1987-2002, Larry Wall
[..]
did you check to make sure you did not
install one version in /usr/local/bin
and the other in /usr/bin
we've played that game be
From: "Dennis G. Wicks" <[EMAIL PROTECTED]>
> On Fri, 2 Aug 2002, Jenda Krynicky wrote:
> >
> > Computing power is cheap, programmers' time is expensive!
> >
>
> Yes, but the programmer's time is only used once.
> CPU cycles are used again and again and again ...
So you have to find the righ
From: "Larry Steinberg" <[EMAIL PROTECTED]>
> I have a subroutine that grabs a parameter (city) from the url for use
> in the script (which produces a report with the value of that
> parameter). I now want to grab another parameter (state) and append it
> to the previous and have it also appear in
From: drieux <[EMAIL PROTECTED]>
> here's a really DUMB question
>
> but I consider perl's "hash" to be one of
> the two or three critical features - the
> other one is clearly the RegEx stuff that
> allow you the power of sed/awk but without
> having to fork the child to do that...
>
> the
When I try to use the value from $0, I get the full path to the script or a leading ./
depending on how the script is invoked. If I want my log file to have a line similar
to:
# GENERATED BY myperlscript
how can I do this without the extra info:
# GENERATED BY ./myperlscript
or
# GENERATED B
Check out the File::Basename module that comes standard. You can use it to
get just the filename.
-Original Message-
From: Chip Place [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 02, 2002 4:29 PM
To: [EMAIL PROTECTED]
Subject: $0 and path
When I try to use the value from $0, I get
Chip Place wrote:
>
> When I try to use the value from $0, I get the full path
> to the script or a leading ./ depending on how the script
> is invoked. If I want my log file to have a line similar
> to:
>
> # GENERATED BY myperlscript
>
> how can I do this without the extra info:
>
> # GENER
58 matches
Mail list logo