Thanks Timothy. However, I'm not sure if I understand...
constraining to html? I said I wanted to avoid html and the need to supply
the path of the file via form. Below is my short script; all I want to do is
to be able to specify the path of the file within the script, instead of
waiting for the
Are you uploading this file to somewhere outside of your LAN/WAN? I guess
what I'm wondering is, why are you constraining yourself to using http?
-Original Message-
From: Mariusz
To: [EMAIL PROTECTED]
Sent: 3/11/02 6:48 PM
Subject: uploading without using forms :(
Thanks for your sugg
Thanks for your suggestion, Mathew. However, the problem I have is how to
avoid using any form (html) all together.
This is what I'm trying to accomplish:
1. There is a file in a given location ( e.g. C:\folder\file.html).
2. I call the script via http address.
3. The script uploads the file.htm
Well, your question may not be the answer you want, really. If you just
want to change a number from a negative to a positive(and vice versa), you
can multiply your number by -1.
I suspect, however, that what you really want is a way to return the
absolute value of your variable. To do
use abs($value) to absolute value
Wags ;)
-Original Message-
From: Stuart Clark [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 11, 2002 19:03
To: perllist
Subject: negative to positive
Hi all
How do i change a negative value to a positive?
EG
$number1 = -100;
$number2 = 50;
If you gave some code with your question, I would have a better idea what is
taking so long. I will venture a guess, only because I know what happened
when I first started working with large files. The first thing to check is
if you have any code that looks like this:
-
Hi all
How do i change a negative value to a positive?
EG
$number1 = -100;
$number2 = 50;
$result = $number2 - $number1;
The $result variable would equal -50
I want to change the script so it would equal 50
so something like this $result = makethisapositive($number2 - $number1);
--
To
Is there a way to upload a file without being forced to provide the directory path
through the "param()" function?
I basically want people to click on the button (within Access db) that would
automatically upload their file and post it onto the website. I basically created a
macro that opens a
Hello all,
I have a few files that are on average 30MB and need to be processed through
a perl script. The script ends up taking almost and hour. Thing is, the
script cannot run more than an hour cause another script is kicked off (same
script different data every hour).
What is the best way t
Hello all,
I have a few files that are on average 30MB and need to be processed through
a perl script. The script ends up taking almost and hour. Thing is, the
script cannot run more than an hour cause another script is kicked off (same
script different data every hour).
What is the best way t
On Monday 11 March 2002 23:31, you wrote:
> More to the point, you mean you are running X on a
> unix server? ADSL scripts sounds like you are an
> ISP...
The opposite is true. This is for a pure desktop distribution
(Lycoris Desktop/LX) to make connection easier, more
transparent and simpler
On Monday 11 March 2002 23:50, David Gray wrote:
> > "su root adsl-start". My problem is how to pass the root
> > password which the user enters into the GUI to this
> > command. Is it possible?
>
> If you turn on the setuid bit of your perl script, then it
> will run as root.
Thanks, that's an o
Joyce et. al.
At one point we relied on perl scripts to send important system alarms via
the internet to cell phones. The bottom line is that if the messages you
are sending are critical (like your dot com's main web site just died) I
would suggest taking a hard look at pager delivery -vs- cell-
From: Jason Larson <[EMAIL PROTECTED]>
> > Sorry I don't understand why this happens. Just a wild guess ...
> > could you try to name your variable something else than $Registry?
>
> Didn't even dawn on me to try something like that... was following the
> example listed in th
> -Original Message-
> From: Jenda Krynicky [mailto:[EMAIL PROTECTED]]
> Subject: Re: Problem with EXE created by PerlApp
>
> From: Jason Larson <[EMAIL PROTECTED]>
>
> Sorry I don't understand why this happens. Just a wild guess ...
> could you try to name your variable something else
It's not possible to do that server-side... You could use your cgi
script to write some javascript to the page that would simlulate the
user clicking the back button, i.e.
print << HTML;
edit form
HTML
Or something... I'm not too current on my javascript syntax, but I think
that's what you want.
> "su root adsl-start". My problem is how to pass the root
> password which the user enters into the GUI to this command.
> Is it possible?
Not sure, anyone? (you might want to look into using an expect
script...)
> I tried opening a perl pipe
> Is there a way to pass the password with being pr
From: Joyce Harris <[EMAIL PROTECTED]>
> I don't think this phone accepts email messages so it will have to be SMS.
Even though my phone can download emails via POP3 I'm not
using that feature.
Anyway if I send an email to [EMAIL PROTECTED] it
comes to my mobile phone as a plain old SMS messag
To convert # of seconds to # of days.
At 05:19 PM 3/11/2002 -0500, Nikola Janceski wrote:
>You forgot to comment why you are dividing by 86400. (I learned the hard
>way, and still can't figure out how some of my old uncommented code works.)
>
>-Original Message-
>From: Hanson, Robert [mai
> I'm creating a GUI front-end for the adsl scripts
> which need to run as root. The bash command is
> usually:
>
GUI, in root... if the bloke maintaining all this
needs a GUI then something is wrong.
More to the point, you mean you are running X on a
unix server? ADSL scripts sounds like you a
You forgot to comment why you are dividing by 86400. (I learned the hard
way, and still can't figure out how some of my old uncommented code works.)
-Original Message-
From: Hanson, Robert [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 11, 2002 5:04 PM
To: 'Imtiaz ahmad'; '[EMAIL PROTECTE
At 09:23 PM 3/11/02 +, Mariusz K wrote:
>Thank you very much for your response. Could you recommend any solution? I
>know the path where the file is sitting and I want to create a script that
>would automatically upload it. (I don't want the user to be bothered with
>entering the path each
Even easier is to use Date::Parse.
use Date::Parse;
$var1 = '2002-02-01';
$var2 = '2002-02-28';
print abs( str2time($var1) - str2time($var2) ) / 86400;
Rob
-Original Message-
From: Imtiaz ahmad [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 11, 2002 4:19 PM
To: '[EMAIL PROTECTED]'
Su
Would you mind sharing that script? I would much appreciate it...
Thanks,
Daniel
-Original Message-
From: Ray Seals [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 11, 2002 1:38 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: message to cell phone
Most cell phones will all
I only tested it real quick, but it seems ok. I would test it a little more
though, and maybe add some error checking.
use Time::Local;
$var1 = '2002-02-01';
$var2 = '2002-02-28';
print daysDiff($var1, $var2);
sub daysDiff {
$d1 = dateToTime($_[0]);
$d2 = dateToTime($_[1]);
return abs(
I use timelocal picking a time of day say noon to do the calculation. You
could use other modules, but very simple and straightforward.
use Time::Local;
# secs,minutes,hours,day,month,year
# You can subtract out the 1900, but it seems to smart enough to
From: "Ray Seals" <[EMAIL PROTECTED]>
> Most cell phones will allow you to send email to them. That's how we do
> it. We just use sendmail from the perl script. For example, Cingular
> cellular is area code phone number @ my.cingular.com. So we send e-mail
> to [EMAIL PROTECTED]
Yes this is w
From: "Scott Lutz" <[EMAIL PROTECTED]>
> Re : perldoc -q "I just want to increment the number in the file"
>
> How does one find (out about) these obscure perldoc functions?
> My word!
The of-so-usual -h option gives you information on perldoc's ussage:
perldoc [options] PageName|ModuleName|P
From: "anthony" <[EMAIL PROTECTED]>
> i have started to learn MIME::Lite and i have problmes for the sending part
> , i want my script to use the servers's default mailprog.
> This is how i did it(and i have an error)
And the error was???
> ##
> $to= param('to');
> $subject
From: Jason Larson <[EMAIL PROTECTED]>
> __Disclaimer__ ***Sorry about the giant company disclaimer at the end***
I've seen much longer :-)
> I have a script (script follows signature) that works just fine when
> executed at the command line (i.e. perl.exe fixnetrcname.pl). I want to
> make th
Hi-
Does anyone know how to calculate number of days if the dates are
'2002-02-01' '2002-02-28'?
In other words, if var1='2002-02-01' and var2='2002-02-28' then
how can we say days=var2-var1?
thanks.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTE
I usually use
-Original Message-
From: Hanson, Robert [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 11, 2002 4:16 PM
To: 'willy wonka'; [EMAIL PROTECTED]
Subject: RE: Browser navigation with cgi
You can't do that server side, you would need to use client side JavaScript
in the page
Thank you very much for your response. Could you recommend any solution? I
know the path where the file is sitting and I want to create a script that
would automatically upload it. (I don't want the user to be bothered with
entering the path each time.)
Thank you,
ps. You said: "you want to
Some versions of PPM had some problems, and your config file might have been
messed up. I haven't seen this problem lately, but I have had it happen to
myself a while ago.
There should be a file called ppm.xml in your Perl library. You will need
to check it out, and see if it is still a well-fo
I don't think this phone accepts email messages so it will have to be SMS.
Joe Raube wrote:
> Depends -- how is it addressed?
>
> SMS or email?
>
> Can you send an email to it?
>
> -Joe
>
> --- Joyce Harris <[EMAIL PROTECTED]> wrote:
>
>> I am looking for info on how to send an alert messag
You can't do that server side, you would need to use client side JavaScript
in the page to do that.
What it sounds like though it that you have a user filling in a form, and
if there is a problem with it you want to send them to the form again,
right?
If so, what you want to do is show them
An example..
I often have to rely on our editorial department to create links for their
web articles. I've written programs for them that will auto-generate links
for them, eliminating the human error factor, which was fairly common. I
don't expect them to be knowledgeable about our website, an
Hi folks,
I'm creating a GUI front-end for the adsl scripts which need to run as
root. The bash command is usually:
"su root adsl-start". My problem is how to pass the root password which
the user enters into the GUI to this command. Is it possible?
I tried opening a perl pipe like this which w
Does anyone konw if it is possble to access the goback feature
built into the ie5 and netscape throught cgi script.
I can use a url in a form action to go back to the page
I wan't but the form info on the page is gone. If I use
the back button on the browser the info is still there.
I am trying
Hi guys,
I have a newbie question. I've tried to update my module packages and
was using ppm on win2k. After I installed Tk, my ppm isn't working
anymore. It'll still give me command prompt, but when I type verify
-upgrade, nothing happens. Can anybody help me?
Thanks
Eric
It can be useful for example if you want to run perl scripts from schedule
jobs on remote servers and you don't want to install perl on the server, or
if you want to distribute a script offline (on a CD, for example), but don't
want to worry about who has what module installed locally. Personall
This isn't just directed at you Chuck, but
What's the benefit of a precompiled perl program? I just haven't found a
need for one and was wonder what is the pros/cons and uses?
-Original Message-
From: Chuck [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 11, 2002 2:59 PM
To: [EMAIL PROTEC
I have Activestate Perl 5.6.0 and have been trying to use
perlcc.bat to compile a .PL file into a .EXE file. I often get
errors like "'' not found" or just the perlcc help screen. How
do I compile PL files on Win2000?
I read the docs and they were all slanted to unix. Do I need to
get a C com
Most cell phones will allow you to send email to them. That's how we do
it. We just use sendmail from the perl script. For example, Cingular
cellular is area code phone number @ my.cingular.com. So we send e-mail
to [EMAIL PROTECTED]
Ray
-Original Message-
From: Joyce Harris [mailto:
I think you want something like this (or some derivation)...
while () {
if( /DisplayName(.*)/ ) {
print $_; # print the full line
$mytext = $1; # assign trapped text
}
}
Rob
-Original Message-
From: Allison Ogle [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 11, 2002 2:29 PM
I think the line you're looking for is
($mytext) = $_ =~ /DisplayName(.*)/;
Perl assigns the default variable $_ to the result of a line read from a
file in a while() statement.
-Original Message-
From: Allison Ogle [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 11, 2002 11:29 AM
T
Hi,
I have a problem trying to assign part of a string to a variable using the
filehandle. For example, if the string was DisplayName =XYZ and I want to
assign XYZ to the variable $mytext in the code below how would I do this. I
am having trouble with the line ($mytext) =()=~ /DisplayName(.*)/
I am looking for info on how to send an alert message to a cell phone
from a perl script. Any ideas?
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
At 12:36 AM 3/11/02 -0600, Mariusz wrote:
>Hi,
>
>I wrote this simple script to upload files, but when I substitute
>param('uploadfile') with the actual path in double quotes it doesn't work
>that way. However, it works perfectly fine if I use the form to submit the
>path of the file through an
I'm trying to change the inbound and outbound port speeds of a serial port
using POSIX. I'm trying to write a small perl script to drive an LCD
display. The reason I open it as DisplayIO is because I need to print to
standard IO. At the moment all I'm trying to do is change the port speed bu
Are you sure you want a hash? The whole point of a hash is to create an
array with custom indexes instead of consecutive numbers.
In any case, I think what you are looking for is readdir(). This will
return an array with the files in a directory. The following code will
populate the @files a
Looks like you that almost works, Tanton. I think what he wants is:
$string =~ s/^(.*?)Call Distance:.*/$1/;
Hope this helps...
Jason
> -Original Message-
> From: Tanton Gibbs [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, March 10, 2002 11:29 PM
> To: Daniel Falkenberg; bob ackerman
> C
> -Original Message-
> From: M z [mailto:[EMAIL PROTECTED]]
> Subject: help with my parser program?
>
> could someone please help me make this bit of code
> more efficient? I am trying to break really long
> lines, say up to 600 characters into manageable sizes
> (78 or less characters)
neat
works straight away :)
thx
martin
On Mon, Mar 11, 2002 at 02:15:59PM +, Jonathan E. Paton wrote:
> > so I have a dir with files:
> >
> > /dir/foo.jpg
> > bar.jpg
> >
> > and I want a
> >
> > %hashtable = (
> >1 => 'foo',
> >2 => 'bar'
> >
> so I have a dir with files:
>
> /dir/foo.jpg
> bar.jpg
>
> and I want a
>
> %hashtable = (
>1 => 'foo',
>2 => 'bar'
> )
>
> how can this be done ?
Try map:
%hashtable = map { $ctr++, $_ } @files;
Or even:
%hashtable = map { $ctr++, $_ } <
hi
im trying to make a hashtable of filenames, where the key is a forthrunning number and
the value is a filename in a dir.
so i have a dir with files:
/dir/foo.jpg
bar.jpg
and i want a
%hashtable = (
1 => 'foo',
2 => 'bar'
)
how can this be d
> How do I delete some words in a string, like with
> SED in Unix.
You you want, think of Perl as sed's big brother :)
perl -p -e 's/WORD//g'
or, in a script:
$string = "String that has a WORD I want deleted";
$string =~ s/WORD//g;
Jonathan Paton
_
FORIZS Zsolt wrote:
>
> How do i delete some words in a string, like with SED in Unix.
>
> please give me some ideas.
use a regexp as in sed
my $string = "this string sucks";
$string =~ s/sucks/blows/;
look at 'perldoc perlre'
/jon
>
> cu zsolt
>
> --
> To unsubscribe, e-mail: [EMAIL PROT
How do i delete some words in a string, like with SED in Unix.
please give me some ideas.
cu zsolt
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Hi,
> I have some text here that I have placed in a string. I want to be able
> to extract words between text of my choice. For example in the
> string...
>
> $string = "Hello world In: crud all Your.";
>
> ($mytext) = $string =~ /In:(.*)Your/;
>
> The above works fine but how can I tell my re
On Sat, Mar 09, 2002 at 11:36:08PM -0800, Troy May wrote:
> How do you write to the beginning of a file?
That's an easy one: Just turn the file around, and append to its end.
# cat > regular
first
second
third
^D
# mkfifo backwards
# while : ; do tac regular > backwards; done &
[1] 18464
# cat b
Try changing
($mytext) = $string =~ /In:(.*)Your/;
to
($mytext) = $string =~ /In:(.*?)Your/;
This is a common problem in regular expressions. Asterisks in Perl regular
expressions are inherently greedy. They will match as much as possible
while stil creating a match. Try doing a sea
62 matches
Mail list logo