I have a small dynamic website I wrote in perl. All news and stuff is
entered through a web accessible backend page and the data is written to a
series of flat ascii text files. When I make a mistake in entering data,
or if I want to change most data, I have to shell in and edit it with vi
is there a function that does this or something similar in CGI.pm?
## print start_form and other stuff
print map { hidden($_, param($_)) } param(); # pass remaining info
## end form stuff here
PS. what's the easiest way to pass parameters that have more than one value
using a similar method
Anurag K. Singh wrote:
hi all,
Hello,
I have control characters ( like ^A , ^M ) in my ascii input file
and I want to substitute them by space or just delete them.
Can anyone suggest a regex for this substitution ???
If you want to remove all control characters:
Yes , they are literally ^A.These characters appears in the file
when a ascii file was ftp'ed to a unix machine in binary mode.
I don't have that ascii file now , so i have to correct this
file in unix.
-Original Message-
From: Timothy Johnson [mailto:tjohnson;sandisk.com]
Sent:
In that case, this should work:
my $string =~ s/\^[AM]//gi;
I think you just have to escape the '^'.
-Original Message-
From: Anurag K. Singh [mailto:AnuragS;Amdocs.com]
Sent: Tuesday, October 22, 2002 12:33 AM
To: 'Timothy Johnson'; '[EMAIL PROTECTED]'
Subject: RE: Control characters
Hi ,
I think this should do :
my $temp =~ s/[[:^print:]\r]+//go;
Regards
-Basavaraj
Anurag K. Singh wrote:
Yes , they are literally ^A.These characters appears in the file
when a ascii file was ftp'ed to a unix machine in binary mode.
I don't have that ascii file now , so i have to
Hi there,
I've got a hash that has keys which contain either
- array references
- scalar values
for example:
@values = (12398712984, 19286192879);
$hashofarrays{'family'}{'arrayref'} = \@values;
$hashofarrays{'family'}{'scalar'} = 12938712938;
I'm trying to map the hash into another array that
Hi,
if i exec sleep $tm, the process sleeps for a time beetwen $tm-1 and $tm
seconds.
If i want do sleep the process for a time $tm +/- $delta with $delta
$tm ?
Is possible ???
Thanks
Walter
--
God hates us all
Per favore non mandatemi allegati in Word o PowerPoint.
Si veda
Hi -
I'm not 100% sure I understand your question...
But the perl core 'sleep' has a resolution of whole
seconds. If you are trying to sleep for, say, 750ms,
please refer to something like
Time::HiRes
on CPAN.
Aloha = Beau.
-Original Message-
From: walter valenti
On Mon, 21 Oct 2002 13:44:59 +0200, [EMAIL PROTECTED] (Andreas
Pflug) wrote:
I am quite new to perl and I am starting with a big problem.
I just compiled Perl 5.8.0 from the source - Works fine.
I added several module - Works fine.
I added GD 2.0.1 - Problem starts:
If I execute this script on
_
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread
Index]
Re: Digest::MD5 - U32 /usr/bin/ld - cannot find -ldb
_
*
ok, this probably has an easy answer, but yet i can't think of it. i want to create a
table, not a table in html, otherwise this would be so easy, but it's not. the idea
is, i have variable length data, and i want to be able to create a table out of it, if
i give you a sample, and show how i'd
Hi everyone,
I have a perl script I am trying to make run quicker. Currently,
the script runs line-by-line and executes each line of code. The next
line of code does not execute until the previous line is finished.
One line of the code tarrs a bunch of files and does not go to the
next
Hi,
Can anyone help me?
This is what I try to make:
I do have a Microsoft Access file on the network.
I would like to give our employees the opportunity to fill in a HTML form
(to be created in Dreamweaver) and send (store) the data to the shared
networkdirectory.
Once this is done, the data
Hi everyone,
I have a perl script I am trying to make run quicker. Currently,
the script runs line-by-line and executes each line of code. The next
line of code does not execute until the previous line is finished.
One line of the code tarrs a bunch of files and does not go to
I have a small dynamic website I wrote in perl. All news and stuff is
entered through a web accessible backend page and the data is written to a
series of flat ascii text files. When I make a mistake in entering data,
or if I want to change most data, I have to shell in and edit it with vi
There is an on-line forum for people who have read
Damian Conway's book, at
http://www.manning.com/getpage.html?project=conwayfilename=forum.html
And anyone who is serious about OO Perl will read that book.
--
Peter Scott
http://www.perldebugged.com
--
To unsubscribe, e-mail: [EMAIL
I predict that if you insert
BEGIN { $|=1; print Content-type: text/plain\n\n }
after the #! line of that script, you will see something illuminating when
you next visit it through a browser.
If you still get a 500, then most likely the file permissions are wrong.
--
Peter Scott
In article [EMAIL PROTECTED],
[EMAIL PROTECTED] (Michael Kavanagh) writes:
Hi there,
I've got a hash that has keys which contain either
- array references
- scalar values
for example:
@values = (12398712984, 19286192879);
$hashofarrays{'family'}{'arrayref'} = \@values;
Fairly new to perl, and even programming in general.
When I try to have this program it to a large number of pings (anything
over about 200) it times out. There is a built in feature to
Net::Telnet::Cisco to change the Timeout value, but I can't seem to get it
coded correctly.
Dan wrote:
ok, this probably has an easy answer, but yet i can't think of it. i want
to create a table, not a table in html, otherwise this would be so easy,
but it's not. the idea is, i have variable length data, and i want to be
able to create a table out of it, if i give you a sample, and
See bottom for my response...
-Original Message-
From: dan [mailto:dan;abovenet.org]
Sent: Monday, October 21, 2002 5:42 PM
To: [EMAIL PROTECTED]
Subject: Tables
ok, this probably has an easy answer, but yet i can't think of it. i want to
create a table, not a table in html, otherwise
Hi,
I have a really simple question.I have two numbers
say $a = 1.55
$b=1.55
how do I compare them to exactly 6 decimals without doing a round off.I used sprintf
but it does a round off.
thank you.
-
Do you Yahoo!?
Y! Web Hosting - Let the
Hi all. I am sorry to post a question such stupid as this one, but it has me
stumped. I have a fairly long perl program that gives me the following error
when I run it.
Missing right bracket at ./a.pl line 877, at end of line
syntax error at ./a.pl line 877, at EOF
Execution of ./a.pl aborted due
Hi There,
I would like to change a array @xx looking like this:
R23 4587 4985934 3245324 6
to:
R23 4587 4985934 3245324 6
with other words I would like to insert (not replace) at character
position 8 and 31. I have have tried to use splice and substr but since the
changes
I would guess that you are missing a curly bracket '}' somewhere in your
program, but the program doesn't realize it until the end. The only way to
find it that I know of is to use good spacing in your program and walk
through { by { looking to make sure that it's paired correctly.
See inline comment:
-Original Message-
From: Balint, Jess [mailto:JBalint;alldata.net]
Sent: Tuesday, October 22, 2002 2:17 PM
To: '[EMAIL PROTECTED]'
Subject: Missing Bracket
Hi all. I am sorry to post a question such stupid as this
one, but it has me
stumped. I have a
.--[ Schwedler Kofoed wrote (2002/10/22 at 20:25:01) ]--
|
| Hi There,
|
| I would like to change a array @xx looking like this:
|
| R23 4587 4985934 3245324 6
|
| to:
|
| R23 4587 4985934 3245324 6
|
| with other words I would like to insert
Perhaps this is really clumsy, but maybe this will help. If not, the
others on the list will fix us right up.
until (length($a) - index($a, '.') 8){
$a = substr($a, 0, (length($a)-1))
}
Shawn
If you have no '{}'s in mid-line comments, you could -
#!/usr/bin/perl -w
use strict;
my ($open, $close) = (0,0);
while( ) {
$open += () = $_ =~ m'{'g unless /^#/;;
$close += () = $_ =~ m'}'g unless /^#/;
}
print Opens: $open\nCloses: $close\n;
# bracket_check.pl filename
-G
On Tue,
I will include no code here, just concept.
A html SELECT type form, that pulls its options from a predetermined directory
(possibly recursivley) using the dir
listing functions built into perl. Select your file and hit submit. A script then
takes that file name, does an open()
on it shoves the
I neglected to ask:
You did not mention what you would like done to a number with less than six
decimal places. Do you want them padded with zeroes?
I was in too much of a hurry to be the one helping someone else, rather
than asking for help, that I fired this script right off as soon as I
My localtime function returns this: Tue Oct 22 18:30:53 2002
I am in the Central Time zone and my machine time (net time at DOS prompt)
returns this: 10/22/2002 1:37 PM
Does anyone have any idea why my localtime is 5 hours ahead?
Thanks,
Kristi
Kristi Goodman
Technical Support
webmin has a web based text editor
http://www.webmin.com
Continued Growth
Chuck Belcher
[EMAIL PROTECTED]
410-347-8449
--( Forwarded letter 1 follows )-
Date: Tue, 22 Oct 2002 09:12:36 -1000
To: [EMAIL PROTECTED]
From: Korthrun[perl]@korthrun.net.SMTP
Naveen Prabhakar wrote:
Hi,
I have a really simple question.I have two numbers
say $a = 1.55
$b=1.55
how do I compare them to exactly 6 decimals without doing a round off.I
used sprintf but it does a round off.
i don't know why you would want to do that but perhaps
Your locale is not set to CST6CDT.
See 'perldoc perllocale'
-G
On Tue, 22 Oct 2002 13:38:47 -0500
Goodman Kristi - kgoodm [EMAIL PROTECTED] wrote:
My localtime function returns this: Tue Oct 22 18:30:53 2002
I am in the Central Time zone and my machine time (net time at DOS
prompt)
What are the best IDEs for Perl - for Linux or Windows? Thanks.
Jim
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
There's also XML::LibXML::Document
XML::LibXML::Node.
I currently use them and they do the job. The Document module emulates a
DOM tree while you can use the Node module to work with your element nodes.
Mel
Admin-Stress wrote:
Hi,
anyone can suggest me XML module for reading/parsing/modifying
It depends on which meaning of IDE you mean..
http://www.acronymfinder.com/af-query.asp?String=exactAcronym=ide
but if it's ever a question of windows or unix:
I personally always choose unix, unless the question is which will break
first.
-Original Message-
From: Jim Thomason
Hi,
How do I subscribe to the perl xml mailing list?
thanks
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
My localtime function returns this: Tue Oct 22 18:30:53 2002
I am in the Central Time zone and my machine time (net time at DOS
prompt) returns this: 10/22/2002 1:37 PM
Does anyone have any idea why my localtime is 5 hours ahead?
Go to Control Panel\Date/Time and make sure the
No, mine does no padding. It's a very simple loop which just chops off the
last character if there are more than six characters after the decimal
point. Come to think of it, you could probably replace it with a chop()
command:
old:
until (length($a) - index($a, '.') 8){
$a = substr($a, 0,
I think net time will return UCT, or Universal Coordinated Time, which
used to be known as Greenwich Mean Time.
If you were to just type time at the DOS prompt or date at the *nix
prompt, the time should agree with LOCALTIME.
Shawn
On Tue, Oct 22, 2002 at 12:49:48PM -0400, Chris Benco wrote:
[snip]
my @output = $session-cmd(
ping
$protocol
$ip
$repeat
$datagram
$timeout
$extended
$sweep
);
[snip]
$session-cmd(Timeout = 3600);
my @output = $session-cmd(
[snip]
my @output =
On Tue, Oct 22, 2002 at 11:15:02AM -0700, naveen prabhakar wrote:
Hi,
I have a really simple question.I have two numbers
say $a = 1.55
$b=1.55
how do I compare them to exactly 6 decimals without doing a round
off.I used sprintf but it does a round off.
thank you.
On Tue, Oct 22, 2002 at 09:22:04AM +0300, Fogle Cpl Shawn B wrote:
my $i = /mnt/disk/sound/high_quality/how_now_brown_cow_ain't_happenin.flac;
if ( /[']/ ) {
link /tmp/tmp_music_file $i;
system flac qq(flac -c -d /tmp/tmp_music_file | rawplay);
}
This is a very crude example (the syntax is
On Tue, Oct 22, 2002 at 03:54:24PM -0400, Nikola Janceski wrote:
-Original Message-
From: Jim Thomason [mailto:thomason_jim;juno.com]
Sent: Tuesday, October 22, 2002 3:39 PM
To: [EMAIL PROTECTED]
Subject: Re: IDE
What are the best IDEs for Perl - for Linux or Windows?
I heard about Sygwin when reading the Re:IDE letter, and it is kinda funny,
but I downloaded it yesterday. I haven't used it yet, but I am wonder what
it is how it works and how I can use it to my advantage in this M$ world.
Thanks.
Tyler Mace
Application Programmer
Sunergize
--
To
Hi Perl-Meisters,
My if loop didn't work with last so I changed if to while, but it
seems that the redo doesn't cause the while to re-evaluate with the new
value of $destfile. When I run this and type something other than yes I
get the message File foobar already exists... (even though 'it
This is the output from a script that outputs the localtime variable and the
net time command.
LocalTime: Tue Oct 22 20:18:31 2002
Net Time: Current time at \\kgoodm is 10/22/2002 3:18 PM
The localtime output is still 5 hours ahead of my net time output.
I looked and my time zone is
When I type time at the command prompt it is different from localtime.
Time: C:\worktime
The current time is: 15:28:42.03
localtime: Tue Oct 22 20:29:59 2002
-Original Message-
From: [EMAIL PROTECTED]
[mailto:shawn_milochik;godivachoc.com]
Sent: Tuesday, October 22, 2002
Clueless newbie question about iterating over selected regions of a file.
I have in input file structured something like this:
*** Iteration 1
data,data,data,data,data
data,data,data,data,data
data,data,data,data,data
*** Iteration 2
data,data,data,data,data
data,data,data,data,data
On Tue, Oct 22, 2002 at 10:13:49PM +0200, K Pfeiffer wrote:
My if loop
if isn't a loop, it's a conditional.
didn't work with last so I changed if to while, but it
seems that the redo doesn't cause the while to re-evaluate with the new
value of $destfile.
This is the documented behaviour
Hi,
Can you ad a value to an array?
fx:
@xx = aa bb cc
but I would like to put in ss
so my new array would look like:
@xx_new = aa bb cc ss
thanks
Jakob
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
On Tue, 2002-10-22 at 16:25, Goodman Kristi - kgoodm wrote:
LocalTime:Tue Oct 22 20:18:31 2002
Net Time: Current time at \\kgoodm is 10/22/2002 3:18 PM
Since minutes are different too, I would suspect software and system
clocks aren't sync'ed.
..02
Bob Rasey
--
To unsubscribe,
Hi,
Can you ad a value to an array?
fx:
@xx = aa bb cc
but I would like to put in ss
so my new array would look like:
@xx_new = aa bb cc ss
sure:
push (@xx, ss);
David Newman
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
perldoc -f push
-Original Message-
From: Jakob Kofoed [mailto:kof;mail.dk]
Sent: Tuesday, October 22, 2002 2:30 PM
To: [EMAIL PROTECTED]
Subject: adding stuff to array
Hi,
Can you ad a value to an array?
fx:
@xx = aa bb cc
but I would like to put in ss
so my new array would look
Do you mean Cygwin? It's a UNIX environment for windows. Check out the
front page at www.cygwin.com.
-Original Message-
From: Tyler Mace [mailto:tyler;sunergize.com]
Sent: Tuesday, October 22, 2002 2:03 PM
To: [EMAIL PROTECTED]
Subject: Off the subject a bit, but I want to know...
I
Hi,
For example:
@xx = qw(aa bb cc);
$xx[3] = ss;
for($i=0; $i = 3; $i++)
{
print $xx[$i], \n;
}
From: Jakob Kofoed [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: adding stuff to array
Date: 22 Oct 2002 23:29:32 +0200
Hi,
Can you ad a value to an array?
fx:
@xx = aa bb cc
but I
I've been thinking of jumping to Cygwin for a while. Does anyone know how
it interacts with existing installations of ActivePerl and other stuff (vim,
gawk)?
Does it replace them with its own version, or does it figure out that they
already exist on your system?
Samir
-Original
On Tue, Oct 22, 2002 at 02:05:25PM -0700, David Newman wrote:
[snip]
I have in input file structured something like this:
*** Iteration 1
data,data,data,data,data
data,data,data,data,data
data,data,data,data,data
*** Iteration 2
data,data,data,data,data
data,data,data,data,data
Michael Fowler writes:
On Tue, Oct 22, 2002 at 10:13:49PM +0200, K Pfeiffer wrote:
My if loop
if isn't a loop, it's a conditional.
oops
[...]
Why are you using redo here? while is a loop, it naturally, uh, loops.
You don't need to tell it to loop again. Just let it fall through.
Didn't
Hi -
I replaces them. In my experience, the
cygwin prompt seems to be isolated from your
existing windows environment.
While your at it, you may want to look into
www.mingw.org
and it's prompt msys.
Aloha = Beau.
-Original Message-
From: Patel, SamirX K
Michael Kavanagh wrote:
Hi there,
Hello,
I've got a hash that has keys which contain either
- array references
- scalar values
for example:
@values = (12398712984, 19286192879);
$hashofarrays{'family'}{'arrayref'} = \@values;
$hashofarrays{'family'}{'scalar'} = 12938712938;
It would
Naveen Prabhakar wrote:
Hi,
Hello,
I have a really simple question.I have two numbers
say $a = 1.55
$b=1.55
how do I compare them to exactly 6 decimals without doing a round off.I used
sprintf but it does a round off.
s/(?=\.\d{6})\d+// for $a, $b;
if ( $a eq $b ) {
Schwedler Kofoed wrote:
Hi There,
Hello,
I would like to change a array @xx looking like this:
R23 4587 4985934 3245324 6
to:
R23 4587 4985934 3245324 6
with other words I would like to insert (not replace) at character
position 8 and 31. I have have tried
Hi -
the perl function int does not round,
so something like:
if (int ($a * 1_000_000) == int ($b * 1_000_000)) {...}
should shift each 6 pos left, truncate the fraction,
and do the comparision (untested).
Aloha = Beau.
-Original Message-
From: John W. Krahn [mailto:krahnj;acm.org]
David Newman wrote:
Clueless newbie question about iterating over selected regions of a file.
I have in input file structured something like this:
*** Iteration 1
data,data,data,data,data
data,data,data,data,data
data,data,data,data,data
*** Iteration 2
data,data,data,data,data
Can someone recommend a good text editor for perl cgi scripting? I've been using
notepad, but was wondering if there is something a little better but still simple like
notepad. I wanted to change the background color (I heard green is friendlier to the
eyes) and be able to see the line numbers.
http://www.vim.org
-Original Message-
From: Mariusz [mailto:mkubis22;hotmail.com]
Sent: Wednesday, October 23, 2002 9:58 AM
To: perl
Subject: good text editor
Can someone recommend a good text editor for perl cgi
scripting? I've been using notepad, but was wondering if
- Original Message -
From: Mariusz [EMAIL PROTECTED]
To: perl [EMAIL PROTECTED]
Sent: Tuesday, October 22, 2002 6:58 PM
Subject: good text editor
(My OS is Win98)
Can someone recommend a good text editor for perl cgi scripting? I've been
using notepad, but was wondering if there is
Hi,
I am totally beginner in Perl and programming. I
have no experience before. I want to know that is it
possible to do with perl script to write and send the
mail for outlook without opening outlook
application?.
What I mean is I just enter user name and
password for outlook account
Wow -
First, I don't think you want to go to/from
Outlook - rather you want to access the mail
server that Outlook accesses. Check the tools-
accounts area to see what outlook is accessing.
Next, you _can_ use perl, by way of some modules
available on CPAN (www.cpan.org). You will most
likely
Thanks Beau,
Just one more questions, how about other
mail application like Novell GroupWise, Lotus Notes...
The main objective for me is doing job
automatically without launching client mail
application. Will it be possible? What CPAN modules
should I study? I am on Win32
Along the same lines of what Beau was saying, check your settings to see if
you are using Exchange or SMTP (Internet Mail). If you are using Exchange,
then you can still try using the SMTP modules, many Exchange servers support
SMTP from internal clients as long as you are on the LAN. It
Oh -
If you just want to send mail, try
Mail::Sendmail v. 0.78 - Simple platform independent mailer
on CPAN. Check out the documentation.
Sorry - I don't know anything about your other apps,
but somewhwere down deep they _must_ be using one
or more of the internet swite of mail protocols
Not really perl related but maybe someone did the research..
Programmers spend lots of hours in front of those text editors. What colors
(background and font) are the best for the eyes (vision)?
thanks,
Mariusz
Hi All,
I'm trying to encrypt/decrypt a text file using Crypt::CBC with DES.
The encryption works fine but the decryption seems to yield
only the first
few bytes of the original text. I'm sure i'm missing
something simple.
Any help appreciated.
Example follows:
enc.pl
use
Dan wrote:
ok, this probably has an easy answer, but yet i can't think of it. i want
to create a table, not a table in html, otherwise this would be so easy,
but it's not. the idea is, i have variable length data, and i want to be
able to create a table out of it, if i give you a sample, and
Toby Stuart wrote:
Hi All,
Hello,
I'm trying to encrypt/decrypt a text file using Crypt::CBC with DES.
The encryption works fine but the decryption seems to yield
only the first few bytes of the original text. I'm sure i'm missing
something simple.
perldoc -f binmode
John
--
80 matches
Mail list logo