hi yall,
i just joined the list. i've been fooling with perl scripts for a few months now.
just installing and editing html output mainly...
now i'm studying a coupkle books to write my own (i hope)
question: i've seen a couple post in some forums about creating a temp
file for a lock
Alex Stanciu writes ..
>I`ve got a question for you all. I`m trying to make an online
>map using Perl and PerlMagick, but as I found, it`s too slow
>for my machine, so I`m looking for another solution. Anyone
>here tried this? I saw a nice online map at www.nj.com , and
>I`d really like to kn
Phillip Bruce writes ..
> I like to know if subroutines and Function should be placed
> in any particular order in perl. What is commonly practiced?
> Can anyone give me some examples.
generally subroutines are placed after the main body of code being run .. I
usually put them in the order t
which (just in case you're not familiar with modules and how they work) you
would have a look at by typing the following at the command line
perldoc Archive::Tar
this is a module .. there are many shipped with perl
--
jason king
A Canadian law states that citizens may not publicly remov
Helio S. Junior writes ..
>Does anyone know how to configure a Win2k Web Server?
>What do i have to do in the Web Server and on my
>machine in order to be able to write CGI Applications?
>
>I have got the Win32 port of Perl from ActivePerl.
when you install ActiveState's Perl .. if there's a "De
On Mon, Apr 30, 2001 at 05:50:36PM -0700, Bob Runkel wrote:
: How do I unsubscribe from this email list? I have tried several methods,
send mail to [EMAIL PROTECTED]
--
Casey West
lance turner writes ..
>I'm trying to use the system function to run the gzip program with
>the following line of code:
>
> $status = system("gzip $filename");
>
> where $filename is the file that is to be compressed
>
>It isn't working and a status of 65280 is being returned.
retu
How do I unsubscribe from this email list? I have tried several methods,
but continue to get the emails!?
- Original Message -
From: "Johnathan Kupferer" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, April 30, 2001 5:38 PM
Subject: Re: FileCache - use strict
> This one got u
This one got under my skin so I did a little research:
> use strict;
> use FileCache;
> my $a01;
> $a01 = 'a01file';
> cacheout $a01;
> print $a01 "XYZ\n";
It seems that perl decides that its calling print with arguments '$a01
"XYZ\n"' and then chokes on the argumen
I'm trying to use the system function to run the gzip program with
the following line of code:
$status = system("gzip $filename");
where $filename is the file that is to be compressed
It isn't working and a status of 65280 is being returned.
I've also tried other variations:
print RESULT grep { ! /_vti_cnf/ } ;
# so that could be read as print to the output filehandle the result of the
input file handle filtered by grep.
wow - pretty concise line thereworks well.
I'll need to look up $0 (perldoc perlvar: Contains the name of the file
containing the Perl
Try this...
#!c:/perl/bin/perl -w
use strict;
my $file = 'old_websites.txt';
my $outfile = 'old_web2.txt';
open(INFO, "$file") or die "$!"; # file open w/error check
open(RESULT, ">$outfile"); # tried "$outfile" as well...
while (){
print RESULT $_ unless grep {/_vti_cnf/} $_;
}
close INFO;
--- "Lee, Janet" <[EMAIL PROTECTED]> wrote:
> Hi all.
Hi, Janet. =o)
> Everyone has been so helpful with my other questions, I thought I
> would put out another one.
Cool.
> I'm writing a script that searches through an array of hashes. One of
> the possible fields in the hash is "Comments" a
I did find a way around this problem, though, by using 'select'.
use strict;
use FileCache;
my $a01;
$a01 = 'a01file';
cacheout $a01;
select $a01;
print "XYZ\n";
Check out
perldoc -f select
for more info on select.
It may not be the best solution but
--- "McCormick, Rob E" <[EMAIL PROTECTED]> wrote:
> gang,
>
> # problem: open a file
> # find lines that meet a condition, put them in an output file
>
> Could you share some patterns/sample code that you use to accomplish
> this task? What pattern do you use when the output file doesn't
exis
thanks Dan (and Patrick and Richard)
I did try the:
open(RESULT, ">$outfile") or die "$!"; # it does run, but nothing written
to file?
I also tried shifting the open to after the while loop:
while () {
print RESULT;
}
open(RESULT, ">$outfile") or die "$!"; # runs, but nothin
I'm sorry, strike that. I had the 'use strict' commented out when
testing with 5.6.1. Perl 5.6.1 gives the same warning.
Dan Brown wrote:
>
> Johnathan evidently didn't see the cacheout (as I didn't).
>
> I assume you are using a perl version prior to 5.6.1. I have both 5.005
> and 5.6.1 ins
See
perldoc perlre
and search for \Q
Dan
"Lee, Janet" wrote:
>
> Hi all.
>
> Everyone has been so helpful with my other questions, I thought I would put
> out another one.
>
> I'm writing a script that searches through an array of hashes. One of the
> possible fields in the hash is
I'm not sure what you mean by your last question (what pattern do you
use when the output file...).
The error is due to the fact that outside of quotes the > is an operator
(greater than). Try
open( RESULT, ">$outfile" ) or die "$!";
With the single greater than ">" the output file wil
Johnathan evidently didn't see the cacheout (as I didn't).
I assume you are using a perl version prior to 5.6.1. I have both 5.005
and 5.6.1 installed. The code works with 5.6.1 but gives the error you
see when using 5.005.
Other than upgrading to 5.6.1 (maybe 5.6.0 works fine too), I'm at a
l
Hi all.
Everyone has been so helpful with my other questions, I thought I would put
out another one.
I'm writing a script that searches through an array of hashes. One of the
possible fields in the hash is "Comments" and sometimes the comments have
characters such as ? or * in them. Right now, m
gang,
# problem: open a file
# find lines that meet a condition, put them in an output file
Could you share some patterns/sample code that you use to accomplish this
task? What pattern do you use when the output file doesn't exist when the
script begins?
The code below errors with:
C:\WINNT\P
Thanks!
I'm not sure I understand, though.
I'm trying to write to file 'a01file' which is represented by file handle
$a01.
The info I'm trying to write is "XYZ\n".
I think your solution writes to standard out, not file a01file.
I'm probably still missing something.
Thanks again!
The error is a bit misleading. The problem is you need an operator
between $ao1 and "XYZ\n". Try:
print $a01, "XYZ\n";
or
print $a01 . "XYZ\n";
This should clear things up. I don't know whay perl is trying to do with it if you
don't "use strict"...
- Johnathan
>
> How can I fix this so
Greetings:
I'm not really a beginner in perl. I've been at it for six years. My
major application has been a little colon delimited database
application to manage information at our county fair.
We started out using an old DOS database. We could do all
the main functions with it a
I'm attempting to install Perl 5.005_03 on a Slackware 7.1 system
that has been upgraded to kernel 2.4.3 and uses ReiserFS inside of LVM.
Slackware 7.1 did come with Perl 5.6, but I need to install software that
specifically wants 5.005_03 and will not work with 5.6.
Something in
There's a couple of problems that sound get you started. The first I
see is that @_ is an array containing everything that was passed in. So
when you did
@parms = @_;
The values of each element of @parms are as follows
$parms[0] # first parameter which was $email
$par
> @parms = @_;
> ($user, $user_list, $tag) = split /,/, $parms;
Did you mean:
my($user, $user_list, $tag) = @_;
Try using:
use strict;
at the top of every script. The problem is that @parms is not $parms.
In fact, $parms is undefined, and use strict would point out this
error. Yo
Look at Archive::Tar
Cheers,
Kevin
On Mon, Apr 30, 2001 at 03:05:53PM -0400, [EMAIL PROTECTED]
([EMAIL PROTECTED]) spew-ed forth:
>
>
>
> Is there any special tar utility in perl ? I want to tar up some dirs/files in
> unix and I want to use the inbuilt tar utility inside perl script, if any
Is there any special tar utility in perl ? I want to tar up some dirs/files in
unix and I want to use the inbuilt tar utility inside perl script, if any ? If
so, can somebody provide some pointers to it.
Thx
Kailash
Hi,
I have this small problem of being able to pass routines.
send_mail( $email, '','');
sub send_mail {
$msg = new Mail::Send;
@parms = @_;
($user, $user_list, $tag) = split /,/, $parms;
$msg->to($user);
print "User is $user\n";
$ans = ;
$msg->subject('Password
Honestly, I've never had to. I would use Mail::Mailer except I don't
see it with ActiveState's ppm. Its possible with Mail::Sendmail,
looking at the source I see the note:
Look at http://alma.ch/perl/Mail-Sendmail-FAQ.htm for additional info
(CGI, examples of sending attachments, HTML mai
I figured out why this isn't working. There already exists a module called
B.pm in the perl/lib directory. If you change the name of module B.pm to
something else, then it works!!
Thanks!!
-Original Message-
From: Paul [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 27, 2001 5:11 PM
To: M
: Just curious, how would you send an attachment?
The MIME::Lite module can do this.
-- tdk
Just curious, how would you send an attachment?
Johnathan Kupferer wrote:
>
> Aww... you should have let him hire a consultant. ;o)
>
> Seriously though, this is dead simple. Gary's code is great and robust
> if a bit intimidating for a newbie. You said you have background in
> VisualBasic
Aww... you should have let him hire a consultant. ;o)
Seriously though, this is dead simple. Gary's code is great and robust
if a bit intimidating for a newbie. You said you have background in
VisualBasic and that would lead me to think you might be using windoze
NT or 2000. (Unfortunately
If you plan to use mysql, pick up " MySQL " from New
Riders press. Paul DuBois writes a nice tutorial on
the DBI / DBD that will have you doing plenty very
quickly.
Matt C.
__
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great price
--- Curtis Michelson <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'm a Perl newbie for sure. I recently subscribed to the list and
> this is my first post.
Welcome aboard. =o)
> . . .
> I'd like to try using Perl for a current client project. Situation
> is this:
> Web users need to hit an HTML fo
Hi Curtis,
this script is far from nice, but it works. A lot of it you could
probably remove. The recipientlist enabled me to hide the email
addresses inside the cgi.
To improve it try looking at CPAN for mail handling routines.
Gary
__BEGIN__
#!/usr/bin/perl
#
# My varient of formmail.
#
--- "Morse, Loretta" <[EMAIL PROTECTED]> wrote:
>
> Hello,
>
> While running a perl script on NT is there a way to capture the
> return status of a command? I know how to do this on unix but it
seems
> to be different on NT. I know there is a variable called errorlevel
on
> NT but not sure how
Hi,
I'm a Perl newbie for sure. I recently subscribed to the list and this is
my first post.
My programming background is limited C and VisualBasic stuff. My regular
focus is database development and I work a lot with Filemaker Pro. I also
do some web devpt. as well.
I'd like to try using Pe
Hello,
While running a perl script on NT is there a way to capture the return
status
of a command? I know how to do this on unix but it seems to be different
on NT. I know there is a variable called errorlevel on NT but not sure how
to access this from a perl script.
Here is what I'm trying to
Hi,
I like to know if subroutines and Function should be placed
in any particular order in perl. What is commonly practiced?
Can anyone give me some examples.
--
*** Phillip B. Bruce ***
*** h
Howdy all
I`ve got a question for you all. I`m trying to make an online map using Perl and
PerlMagick, but as I found, it`s too slow for my machine, so I`m looking for another
solution. Anyone here tried this? I saw a nice online map at www.nj.com , and I`d
really like to know how to make the c
--- [EMAIL PROTECTED] wrote:
> I created a first simple program to append code to itself (script
> below). Is there a way to get that code interpreted in the same
> execution? That didn't happen, but when I started it a second time,
> the first appended text was interpreted, the second again not.
On Mon, Apr 30, 2001 at 02:01:47PM +0800, Andrew Teo wrote:
> Hi all,
> I am interested in self-learning the DBI module for database
> manipulation. Are there any good online tutorials available?
Try dbi.symbolstone.org.
--
If the organizational structure is threatening in any way, nothing is
g
On Mon, Apr 30, 2001 at 12:06:55PM +0100, Gary Stainburn wrote:
> Hi all,
>
> can anyone tell me why the following code does not come out with
> '-123.45'. It actually comes out with '123.45-'.
>
> I think that it is because it's treating it as a number at some point,
> but I can't see when/w
The problem is the \ before the . in your regex.
On Mon, 30 Apr 2001 12:06:55 +0100, Gary Stainburn said:
> Hi all,
>
> can anyone tell me why the following code does not come out with
> '-123.45'. It actually comes out with '123.45-'.
>
> I think that it is because it's treating it as
Hi all,
can anyone tell me why the following code does not come out with
'-123.45'. It actually comes out with '123.45-'.
I think that it is because it's treating it as a number at some point,
but I can't see when/why.
#!/usr/bin/perl -w
my $vat='123.45CR';
$vat=~s/(\.*)CR/-$1/i;
print
Hello,
Does anyone know how to configure a Win2k Web Server?
What do i have to do in the Web Server and on my
machine in order to be able to write CGI Applications?
I have got the Win32 port of Perl from ActivePerl.
TIA,
Helio
__
Do You Yahoo
I am very new to perl myself. I was having the same type of problem the
other day. I came up with the following which has worked for me, but like I
said I am a newbie, so it could prolly be done much better:
#!/usr/bin/perl
use File::Find;
@DIRS = ('.') unless @ARGV;
%seen = ();
$lastArtist = $l
I am probably doing something very wrong here, but can someone tell me
why
#!/usr/bin/perl -w
use File::Find;
print "$arg";
open(LISTFILE, "> /home/meyeo/testfile") or die "Can't open the ffin
thingy!";
print LISTFILE "\n";
close(LISTFILE);
find (\&wanted, $arg);
sub wanted
{
# this should p
52 matches
Mail list logo