cool beans, thanks. wow, perl is neat, but i fear it will make me a bad c
programmer...;)
so i guess there is no concept of stack and heap space when dealing with perl?
just that memory will stay allocated as long as there is a way to reach it?
hehe, i can't wait to abuse that fact;)
ch
Christopher J Bottaro wrote:
>
> hmm, something is going off in my head that says this is scary.
Calm down Christopher. :-)
> @array is
> local to the function (lexically scoped as you would say in perl??) and you
> are returning a reference to it.
Yes, that is correct.
> well when the functi
How about lwp-download.bat comes with the installation of ASPerl(on
Windows)?
>-Original Message-
>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
>Sent: Tuesday, 17 December 2002 5:09 AM
>To: [EMAIL PROTECTED]
>Subject: script to download a file. Script to
>
>
>Hello,
>
>I was wonderin
Harry Putnam wrote:
>
> "John W. Krahn" <[EMAIL PROTECTED]> writes:
>
> > printf " %02d/%02d/%04d %02d:%02d:%02d\n", $lta[4] + 1, $lta[3], $lta[5] + 1900,
>@lta[2,1,0];
>
> Thanks.. the tips work good. And I overlooked the part about mnths
> being 0-11.
>
> I get the idea from your posted pri
On Monday 16 December 2002 08:50 am, Jenda Krynicky wrote:
> > i know what i really should do is this:
> > sub myfunc(){
> > my @array;
> > if ( some_cond ) {
> > return undef;
> > }
> > else {
> > #populate @array
> > return [ @array ];
> > }
> > }
>
> Well ... I would u
Toby Stuart <[EMAIL PROTECTED]> writes:
> Check the length of second, minute and hour.
> If the length == 1 then add a leading zero eg. $sec = "0" . $sec
> Maybe there is some other "magical" way of doing this, if there is i'm not
> aware of it :)
Good idea... thanks.
"John W. Krahn" <[EMAIL P
Hello ,
Thanks for the help.. the info which who have provided is
very helpful for me..thanks
Regards,
A.Johnson
!> -Original Message-
!> From: A. Johnson Jeba Asir [mailto:[EMAIL PROTECTED]]
!> Sent: Friday, December 13, 2002 11:05 PM
!> To: [EMAIL PROTECTED]
!> Subject:
"John W. Krahn" wrote:
>
> David Eason wrote:
> >
> > Is there a better way to say:
> >
> > my @input_files = glob (join " ", @ARGV) unless $#ARGV = -1;
> > foreach my $doc ( @input_files ) { ... __code goes here___ }
> >
> > I put the unless clause in there because otherwise...
> > if there are
Bob H wrote:
>
> I have a program that gets an EXE file using a regex pattern and puts it
> into a file variable:
>
> foreach(@list) {
> if(m/\d{8}.*x86.exe/) {
> push(@match,$_)
> }
> }
>
> I then download the matching file:
>
> if(scalar(@match)) {
> $file=$match[$#match]
Satya Devarakonda wrote:
>
> Thanks to all those guys who answered my question As you guys pointed out
> the join worked without //s.
>
> But the code also had some correction to be made (eg. line number 34) and
> would look really like this(and not as I initially sent you folks).
> There are sti
Bob,
Consider:
cls.pl
use strict;
my @switches = @ARGV;
foreach(@switches) {
print"$_\n";
}
$ perl -e '
my @clss = ("cls.pl", "one", "two", "three");
system @clss;'
output:
one
two
three
Takes the first element treats it as an executable and the rest of the list
as arguments.
HTH
"Bob H"
Georg Koss wrote:
>
> A friendly hello to all of you!
Hello,
> As I'm posting first time here, I'd like to introduce myself as a
> bloody perl-newbie ;(
>
> My problem: I tried to use a regexp in a word counting program and
> encountered that any word with a 'german umlaut' is ignored when usin
Hi people ..
I'm using the Mail::Box modules to manipulate e-mail... but I still
don't know how to obtain the names of the files attached to an
e-mail...I need it to validate the type of file and its name...could
somebody help me ?
Thanks a lot ..
--
To unsubscribe, e-mail: [EMAIL PROTECT
A friendly hello to all of you!
As I'm posting first time here, I'd like to introduce myself as a
bloody perl-newbie ;(
My problem: I tried to use a regexp in a word counting program and
encountered that any word with a 'german umlaut' is ignored when using
the following m// :
$word =~ m/^[a
Hello,
I have a perl program that sends out mail.
It has been in production since 1998.
It works fine in most installations.
I recently changed ISPs (new: ISP outgoing mail server is mail.megapath.net)
The messages are now losing the From: line.
In the expanded header, the Return-Path: line is f
--- Bob H <[EMAIL PROTECTED]> wrote:
Bob,
What are you trying to accomplish? Perhaps we can help you find a more secure way of
doing this.
> if(scalar(@match)) {
> $file=$match[$#match];
> print "Downloaded file $file\n";
> $ftp->binary();
> $ftp->get($file);
> }
>
> I now wa
Worked like a charm. I am used to running in unix/linux. Thanks!!
> -Original Message-
> From: Nigel Peck - MIS Web Design [mailto:[EMAIL PROTECTED]]
> Sent: Monday, December 16, 2002 4:32 PM
> To: Paul Kraus; Perl
> Subject: RE: Full Screen
>
>
> Windows probably won't see it as a DOS
I have a program that gets an EXE file using a regex pattern and puts it
into a file variable:
foreach(@list) {
if(m/\d{8}.*x86.exe/) {
push(@match,$_)
}
}
I then download the matching file:
if(scalar(@match)) {
$file=$match[$#match];
print "Downloaded file $file\n";
Thanks to all those guys who answered my question As you guys pointed out
the join worked without //s.
But the code also had some correction to be made (eg. line number 34) and
would look really like this(and not as I initially sent you folks).
There are still has some issues with line 11 and I a
Try this module:
http://search.cpan.org/author/MBLAZ/Win32-DriveInfo-0.06/DriveInfo.pm
I don't know what experience you have so if that's still confusing ask
again.
HTH
Nigel
MIS Web Design
http://www.miswebdesign.com/
-Original Message-
From: Thomas Browner [mailto:[EMAIL PROTECTED]]
Windows probably won't see it as a DOS app so that'll be why. Have you tried
alt and enter (together) to get it off full screen, then right click on the
top left and properties, change the properties, click ok, then save setting
for future windows with same title.
HTH
Nigel
MIS Web Design
http://
Is there away that I can get remote hard drive stat from windows box?
Thomas
Ramprasad A Padmanabhan wrote:
>
> Hello All
Hello,
>I think my question is slightly misplaced in this newsgroup
> I have been using DB_File.pm to read Berkely db files
> Is there a similar library for C ( not C++ )
http://www.sleepycat.com/
John
--
use Perl;
program
fulfillment
--
To
Ben Crane wrote:
>
> I have a dummy list:
>
> Dog, A, B, C
> Dog, 1, 2, 3
> Cat, A, 2, 3
>
> I have a unique list of the first record, Dog and
> Cat...I want to look through the unique list, and then
You should probably be using a hash instead of an array for the unique list.
> match all the
Hi Kipp,
Actually, that is not the case. there is a TOC in the navigation [left] frame of the
Active State help browser, but no interactive index or text search capabilities. Each
serves a critical and time-saving purpose to the developer using them. The index
listings come from markups by t
When I run a Perl app in windows by double clicking on it the app opens
full screen. I do not want it to run like this. I tried right clicking
on it to set properties like you would for a dos app but I do not get
any options. Any Ideas?
Paul Kraus
Network Administrator
PEL Supply Company
216.267.5
[EMAIL PROTECTED] wrote:
>
> What is the difference between:
>
> $arg = "foo \(bar\)";
> and
> $arg = 'foo \(bar\)';
Interpolation. Read the "Quote and Quote-like Operators" section of the
perlop document.
perldoc perlop
> when using like:
>
> s/$arg/bleah/;
>
> One works, one doesn't.
> W
Nyimi Jose wrote:
>
> > From: Jenda Krynicky [mailto:[EMAIL PROTECTED]]
> >
> > From: christopher j bottaro <[EMAIL PROTECTED]>
> > >
> > > #populate @array
> > > return [ @array ];
> > > }
> > > }
> >
> > Well ... I would use
> >
> > return \@array;
> >
> > it's a bit m
When you use the double quotes: $arg looks like foo (bar)
But when you use single quotes, there is no expansion just what you
enter is what you get, so the $arg looks like foo \(bar\)
Obviously the second is not what you want. SO using single quotes,
you set $arg like 'foo
David Eason wrote:
>
> Is there a better way to say:
>
> my @input_files = glob (join " ", @ARGV) unless $#ARGV = -1;
> foreach my $doc ( @input_files ) { ... __code goes here___ }
>
> I put the unless clause in there because otherwise...
> if there are no file arguments, @input_files ends up h
What is the difference between:
$arg = "foo \(bar\)";
and
$arg = 'foo \(bar\)';
when using like:
s/$arg/bleah/;
One works, one doesn't.
Why?
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
This line:
# Loop through all of these customers
for (my $i = 0; $i < $#data; $i++)
where you are doing the $#data needs to be changed to scalar(@data)
or
change the < $#data to <= $#data
Wags ;)
-Original Message-
From: Caroline Warnock [mailto:[EMAIL PROTECTE
Thanks everyone for the help. It worked like a charm. Not actually sure how
it works. Never used
\G b4. My regex books says its not used very much.
Thanks again.
-Original Message-
From: John W. Krahn [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 13, 2002 6:38 PM
To: [EMAIL PROTECTED
I am trying to modify a Perl script that was written by an ex
employee.
The script is supposed to extract customer details from our
database so that the details can be transferred using sendmail to
another database.
The test data on the database consists of 7 customers from 1
to
Hello,
I was wondering is anyone will be willing to share a Perl script to
download a file with me. I tried the example on CGI::Simple, but I do not
know how to make reference to my proxy server "xyx" in the script. What I
ended up doing is to set the "http_server" variable outside at the shell.
>what am I doing wrong with these co-operating perl-scripts?
>the first script sets a cookie, but I cant retrieve them when running
>the 2nd..
>Something wrong with the $cookies=$ENV{'HTTP_COOKIE'};
>$cookies=$ENV{'HTTP_COOKIE'};
>if ($cookies=~/name=/){
> ...
>}
>else {
> print "it doesnt
--- Paul Kraus <[EMAIL PROTECTED]> wrote:
> I found a couple modules. But they all seem to either for getting data
> from excel or creating a new excel worksheet. I need to insert data into
> an excel spreadsheet that already contains data,and several worksheets.
Hi Paul,
If you go to http://www.
I found a couple modules. But they all seem to either for getting data
from excel or creating a new excel worksheet. I need to insert data into
an excel spreadsheet that already contains data,and several worksheets.
> -Original Message-
> From: NYIMI Jose (BMB) [mailto:[EMAIL PROTECTED]]
Forwarded Message
Message-ID:<[EMAIL PROTECTED]>To:[EMAIL PROTECTED]:"maxchen"
<[EMAIL PROTECTED]>Subject:using pipeDate:Sat, 14 Dec 2002 02:11:10 +0800
hi everyone,i am a novice to the perl and i want towrite a perl program to redirect
anotherprogram's STDIN & STDOUT to pipes,it's possible or
Forwarded Message
Message-ID:<[EMAIL PROTECTED]>To:[EMAIL PROTECTED]:"maxchen"
<[EMAIL PROTECTED]>Subject:using pipeDate:Sat, 14 Dec 2002 02:11:10 +0800
hi everyone,i am a novice to the perl and i want towrite a perl program to redirect
anotherprogram's STDIN & STDOUT to pipes,it's possible or
Have you checked CPAN ? http://search.cpan.org/
José.
> -Original Message-
> From: Paul Kraus [mailto:[EMAIL PROTECTED]]
> Sent: Monday, December 16, 2002 5:52 PM
> To: 'Perl'
> Subject: Excel
>
>
> Is it possible to insert data into an excel file using Perl?
> If so can you point me
Is it possible to insert data into an excel file using Perl? If so can
you point me to some info. Thanks.
Paul Kraus
Network Administrator
PEL Supply Company
216.267.5775 Voice
216-267-6176 Fax
www.pelsupply.com
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMA
#!/usr/bin/perl
use strict;
use Benchmark;
sub using_aref{
my $aref=[];
@$aref=(1,2,3,4,5);
return $aref;
}
sub using_array{
my @array=();
@array=(1,2,3,4,5);
return \@array;
}
And the winner is :
timethese (100,{ using_aref => \&using_aref,
On Dec 16, Paul Kraus said:
>How can I grab a numeric string that contains commas.
... that ALSO contains periods in it.
>POINTPoint Health Centers 19,466.79
>0.00 401.20 0.00 19,867.99
>if (/(^POINT)\s+ Point Health Centers\s+([\d\,]*)
How can I grab a numeric string that contains commas.
String
--
POINTPoint Health Centers 19,466.79
0.00 401.20 0.00 19,867.99
My Expr
---
if (/(^POINT)\s+ Point Health Centers\s+([\d\,]*)\s+.*/){
print "$1 $2\n";
}
What it
Ahh, that explains. But what exactly is pseudo-code?
--
Bob Erinkveld (Webmaster Insane Hosts)
www.insane-hosts.net
MSN: [EMAIL PROTECTED]
From: "Jenda Krynicky" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: Re: Die horribly ?
Date: Mon, 16 Dec 2002 15:50:39 +0100
From: "Joh
> -Original Message-
> From: David Eason [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, December 14, 2002 9:53 PM
> To: [EMAIL PROTECTED]
> Subject: glob subtlety question
>
>
> Is there a better way to say:
>
> my @input_files = glob (join " ", @ARGV) unless $#ARGV = -1;
> foreach my $doc
Chris,
I'll take a stab at this to see if my understanding of Perl is correct.
Your first subroutine is acceptable under Perl, but it wouldn't be
under C++. The reason is that Perl has automatic reference counting
and garbage collection. Perl counts the number of references there are
to data el
From: "John W. Krahn" <[EMAIL PROTECTED]>
> Mystik Gotan wrote:
> >
> > Hi there,
>
> Hello,
>
> > another basic Perl question up here. The last time I've seen quite
> > some code using die horribly;. Actually, I've never seen this
> > before. Is this a new built-in for 5.8.0? What I want to kno
From: christopher j bottaro <[EMAIL PROTECTED]>
> hello again,
> all my c instincts tell me i shouldn't write a function like this: sub
> myfunc() {
> my $aref = [];
> if ( some_cond ) {
> return undef;
> }
> else {
> #populate @{$aref}
> return $aref;
> }
> }
> -Original Message-
> From: A. Johnson Jeba Asir [mailto:[EMAIL PROTECTED]]
> Sent: Friday, December 13, 2002 11:05 PM
> To: [EMAIL PROTECTED]
> Subject: getting defunct message
>
>
> hello people,
>
> When I'm trying to server which listens on
> tcp port and
> forking
Additional thought I've apprecitiated
See ==ARCHIVE
José.
==ARCHIVE
-Original Message-
From: Nigel Wetters [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 23, 2002 6:19 PM
To: [EMAIL PROTECTED]
Subject: Re: Perl vs. PHP?
PHP is a good templating language, similar to ASP, JSP,
On Fri, 13 Dec 2002 05:19:08 -0200, [EMAIL PROTECTED] (Andre) wrote:
>Hi
>I know it is not entirely perl, but can anybody esplain me how does i do upload a
>file using a browser (can i use perl to do this)?
>Thanks
Here's a really simple method using CGI::Simple
#
If I use $osheetCR->{Val} the value is in incremental serial numbers
from 1 jan 1900 (or 1 jan 1904 for Apple users).
Example: 12-1-1946 is 16814
I can convert 16814 back to the real date with the date::calc but there
must be some way to extract the year in the right format ( and not yy).
M
Hello All
I think my question is slightly misplaced in this newsgroup
I have been using DB_File.pm to read Berkely db files
Is there a similar library for C ( not C++ )
I have been trying google search but could get one
Thanks
Ram
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional
Hello!
what am I doing wrong with these co-operating perl-scripts?
the first script sets a cookie, but I cant retrieve them when running
the 2nd..
Something wrong with the $cookies=$ENV{'HTTP_COOKIE'};
?
thanks in advanced!
Erik
the first script with cookies:
-
Yes You can.
1st part
print " ";
print " ";
print "";
print "";
select file from local machine using file field.
field name is filetoupload.
afeter submiting you get value of file field at server side using
$filename=$q->param("filetoupload");
if(!open(OUTFILE, ">$SAVE_DIRECT
I have a dummy list:
Dog, A, B, C
Dog, 1, 2, 3
Cat, A, 2, 3
I have a unique list of the first record, Dog and
Cat...I want to look through the unique list, and then
match all the records from the main list (as
above)-matching the unique list value (Dog/Cat) with
the main list...then if there are
Hi,
# ==
#
# Perl Source File -- Created with SAPIEN Technologies PrimalSCRIPT(TM)
#
# NAME:
#
# AUTHOR: Aman Thind , Quark Inc
# DATE : 12/16/2002
#
# PURPOSE:
#
# ==
hello again,
all my c instincts tell me i shouldn't write a function like this:
sub myfunc(){
my $aref = [];
if ( some_cond ){
return undef;
}
else{
#populate @{$aref}
return $aref;
}
}
but its c
I'll answer my own question:
Inside optionsNextItem I'm making a copy of @{$ref}, so setting any
value in that copy won't change the array (stupid me).
-Original Message-
From: Duarte Cordeiro
Sent: Monday, December 16, 2002 9:53 AM
To: '[EMAIL PROTECTED]'
Subject: array iteration & ref
Hi all,
I want to iteract through a array with a step = 2.
Meaning, that, with a array of (1,2,3,4,5,6,7,8,9,0) I want to have 5
interactions with 2elements available in each one. (1,2), (3,4), etc.
Not knowing if there is something OOTB within perl, I just:
sub optionsInitialize{
my ($ref)=
hi guys,
i have found that Excel::Parser and other parsing excel modules very usefull in
parseing all excel data except the formula data, so how can i extract the formula from
a cell ??
thx v.much
--
Hytham Shehab
Folks, even if perhaps not intended as a troll, the effect will be the
same. Please refrain from cross-posting dozens of messages.
David, pick whichever language you are more comfortable with. There is
pretty much nothing in one that can't be done in the other. It's like
asking the Beef and Por
Hi,
I would like to know how to extract the keys and variables from this
line of code that are being parsed by @_
my ($class, %args) = @_;
Also how would I set then so that they wouldn't have to be parsed to the
script.
Thanks.
David.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For addit
Hi,
I have a line in a script
my ($class, %args) = @_;
and I would like to know how to extract the values of @_
and also how to explicatly state them so that they don't have to be
parsed to the script.
Thanks.
David.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands,
How does one tell perl to perform mathematical operations?
I have a file with a series of items like this:
>BLAH1
Length = 500
Identities = 20/100.
>BLAH2
Length = 400
Identities = 30/70
For each item called BLAH, I want to pick the denominator in Identites and
divide by Length and calculate per
Not sure if you want to keep the commas in your array, i.e. $array[$0] = 1,
But, if you don't, you can do this;
$string = "1, 2, 3, 4, 5";
@array = split /,/ , $string;
print "@array\n";
If you want to keep the commas, simply replace /,/ with /\s/
Regards,
Danny
-Original Message-
From
On Sat, Dec 14, 2002 at 12:51:50PM -0500, [EMAIL PROTECTED] wrote:
> Can somebody tell what is wrong with this.
>
> I tried single quote (') in place of double quote(") neither of them work.
>
> 184 for ($i = 0; $i < @clm_types; $i++)
> 185 {
> 186@temp_str = grep (/$_/,@env_desc);
> 187@
Zentara is right about what you need to do, but a fuller explanation
of the solution would have been:
Net::SFTP is throwing an exception when it cannot make the
connection. If the exception is not caught, it will cause your
program to exit. The way you catch exceptions in Perl is to wrap the
cod
Ok, this is very frustrating, 2 days and many hours worth! I have used this
module/lib (libwww) before with ease. The only thing i can think of is i could
be my linux distro? (Debian Woody 3.0), or the pop-servers encrytion methods?.
The following is the exact script i am trying to run, (except w
OOPS. I meant unless $#ARGV == -1
"David Eason" <[EMAIL PROTECTED]> wrote in message news:...
> Is there a better way to say:
>
> my @input_files = glob (join " ", @ARGV) unless $#ARGV = -1;
> foreach my $doc ( @input_files ) { ... __code goes here___ }
>
> I put the unless clause in there because
Is there a better way to say:
my @input_files = glob (join " ", @ARGV) unless $#ARGV = -1;
foreach my $doc ( @input_files ) { ... __code goes here___ }
I put the unless clause in there because otherwise...
if there are no file arguments, @input_files ends up having an element [0]
And the foreach
Ok, this is very frustrating, 2 days and many hours worth! I have used this
module/lib (libwww) before with ease. The only thing i can think of is i could
be my linux distro? (Debian Woody 3.0), or the pop-servers encrytion methods?.
The following is the exact script i am trying to run, (except w
Ok, this is very frustrating, 2 days and many hours worth! I have used this
module/lib (libwww) before with ease. The only thing i can think of is i could
be my linux distro? (Debian Woody 3.0), or the pop-servers encrytion methods?.
The following is the exact script i am trying to run, (except w
Hello All!
I have searched Google, but it turned up nothing useful on this, so I figured that
this would be a good place to ask next.
I just installed the DBD::mysql through the Debian package manager, but it doesn't
seem to bode well with the compiled version of Perl I installed on the machine
Hi
I know it is not entirely perl, but can anybody esplain me how does i do upload a file
using a browser (can i use perl to do this)?
Thanks
How does one tell perl to perform mathematical operations?
I have a file with a series of items like this:
>BLAH1
Length = 500
Identities = 20/100.
>BLAH2
Length = 400
Identities = 30/70
For each item called BLAH, I want to pick the denominator in Identites and
divide by Length and calculate per
hi everyone,
i am a novice to the perl and i want to
write a perl program to redirect another
program's STDIN & STDOUT to pipes,
it's possible or there are source examples
exist?
thanks,
maxchen
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Marco Centemeri wrote:
>
> Hello All,
Hello,
> I'd like to know if a file name is like namefile.ext (only one dot in the name)
> or namefile.xxx.z.ext (more than one dot in the name).
> I tried with regex:
>
> $file1='doctobepublish.new.pdf';
>
> if ( $file1 =~ /\.{2,}/ ) { print "KO filen
80 matches
Mail list logo