Hi all,
Please ignore my last post. I have worked it out.
Thanks!
Di
Over a year ago I started learning Perl. I have been writing software
since 1979, mostly medical and banking/brokerage stuff, so
of all the languages, Java, ASP, C, whatever, I chose Perl because
webmasters easily let it run on their hosted platforms...
Then one day I wrote a letter to Tom Christ
I have a really bad feeling that this is probably the wrong spot, but I
can't think of the right one, so please don't flame me!
I am using perl to write a database report on the web. At the same time, I
want to give the punters the option of downloading it as a text delimited
file for their own
Sorry ! some how did not get both the attachments. send as zip again.
regards
Rajeev Rumale
___
Yesterday is history. Tomorrow a mystery.
Today is a gift. That's why it's called Present.
Greetings !
I am having a some difficulaties in matching and extracting a part of
strings.
I need to load a HTML file into a scalar variable and then extract certain
part of the it which is "marked" ( ie., %%row_start%%% and %%row_end%% ).
The problems is with the "\n" at end of each line in t
Now that I've thought about it, try 's/\d/x/g;' -- '+' is unnecessary and
this should work as you want --
- Dwalu
.peace
--
I am an important person in this world -
Now is the most important time in my life -
My mistakes are my best teachers -
So I will be fearles
How about 's/\d+?/x/g;'
- Dwalu
.peace
--
I am an important person in this world -
Now is the most important time in my life -
My mistakes are my best teachers -
So I will be fearless.
- Student Creed
On Wed, 11 Jul 2001, Fernando w
On 11 Jul 2001, Randal L. Schwartz wrote:
> Brett> $num =~ tr/[0-9]/x/;
>
> Why are you changing square brackets to x as well? Got something against
> square brackets?
My mistake. My apologies to the square brackets.
-- Brett
http://www.chapelperilous.net/bt
On Wed, 11 Jul 2001, Fernando wrote:
> I have a credit card number that I want to change to email a reciept to the
>customer. This is that I want:
>
> I have this number: e.j. 8578 596 8552
> I want to convert all the number to "x" like that xxx
>
> when I use this:
>
> $number =
your apache is not properly configured and doesn't
recognize /cgi-bin/ as de facto directory for
executing scripts.
If your script isn't in the appropriate directory
(like /html) then it is regarded as compliant mime
type and its content is being retrieved.
Look at apache config file and move your
I was just about to suggest that. I have also seen where some companies
show x's for the first 3 groups of numbers then show you the real last 4
digits. Keep in mind I'm a beginner but here's what I came up with for
that:
#!/usr/bin/perl -w
use strict;
my $number = " 8578 596 8552";
my @c
I've installed a Linux box (RedHat 7.1) on a local network to test cgi
scripts. The apache install creates the following directories:
/var/www/html
/var/www/cgi-bin
the html is the default entry point. If I place a html file in the above
directory a machine on the network can pull up the file
> $number = " 8578 596 8552";
> $number =~ s/\d+/x/g;
$number = " 8578 596 8552";
$number =~ s/\d/x/g;
Try without the quantifier for the digit class.
> -Original Message-
> From: Fernando [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, July 11, 2001 5:31 PM
> To: [EMAIL PROTEC
I have a credit card number that I want to change to email a reciept to the customer.
This is that I want:
I have this number: e.j. 8578 596 8552
I want to convert all the number to "x" like that xxx
when I use this:
$number = " 8578 596 8552";
$number =~ s/\d+/x/g;
Perl gi
Thomas,
Try checking the perldocs about getc(). There is some info there that might be
useful. It also mentions checking CPAN.
Adam Carson
MIS Department
Berkeley County, SC
>>> Thomas Jakub <[
--- Adam Carson <[EMAIL PROTECTED]> wrote:
> Gary, you forgot to make it:
>
> while (1) { # infinite loop
> my $c=getc;
> last if ord($c) == 10; # last itteration if $c
> numerically same as 10
> print "blah\n";
> }
what does the my thingie do? Also, when I tried to
run the code, it woul
Teresa Raymond wrote:
>
> Dear fliptop:
>
> Yes sir! That is exactly what I want to do.
ok, good. see below for my thoughts.
> >Teresa Raymond wrote:
> >>
> >> OK, I am a relative novice to Programming, Perl, CGI, CGI.pm and
> >> MIME::Lite. As suggested by others on this list I'm using MIME
Gary, you forgot to make it:
while (1) { # infinite loop
my $c=getc;
last if ord($c) == 10; # last itteration if $c numerically same as 10
print "blah\n";
}
the ord() should be there like it was in Thomas' code.
Not that it really solves anything, just a small bug.
I got mad and removed the old version of perl and did a clean install of
perl 5.6.1 There is no error code at all. Just plain not detecting
multipart/form-data the value of the name is the name of the file.
OS is freebsd 4.3
Thanks
- Original Message -
From: "Curtis Poe" <[EMAIL PROTEC
--- "Bradley M. Handy" <[EMAIL PROTECTED]>
wrote:
>
>
> > -Original Message-
> > From: Thomas Jakub [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, July 11, 2001 11:43 AM
> > To: [EMAIL PROTECTED]
> > Subject: breakable loop???
> >
> >
> > I have the following code segment:
> >
> > for
Why don't you try the more perlish way of doing it
while (1) { # infinite loop
my $c=getc;
last if $c == 10; # last itteration if $c numerically same as 10
print "blah\n";
}
On Wednesday 11 July 2001 4:42 pm, Thomas Jakub wrote:
> I have the following code segment:
>
> for ($count=1;$coun
--- Pierre Smolarek <[EMAIL PROTECTED]> wrote:
> I have an upload script that works fine on other servers, up i just
> reinstalled perl 5.6.1 on a new server and its not working in the same way
>
> CGI.pm is loaded and seemes to detect the value's of forms, but not
> form-data forms...
Is it giv
Bradley,
Thanks much for the URL. I'm a touch suspicious of it since it seems to have
been commisioned by Sun. Any help with the question of what salary to
expect?
-Original Message-
From: Bradley M. Handy [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 11, 2001 10:41 AM
To: Camilo Gonz
I have an upload script that works fine on other servers, up i just
reinstalled perl 5.6.1 on a new server and its not working in the same way
CGI.pm is loaded and seemes to detect the value's of forms, but not
form-data forms...
Do i need to install a mod somewhere?
Need help on this one quite
> -Original Message-
> From: Thomas Jakub [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, July 11, 2001 11:43 AM
> To: [EMAIL PROTECTED]
> Subject: breakable loop???
>
>
> I have the following code segment:
>
> for ($count=1;$count<11;$count++)
> {
> $c=getc;
Your script is pausing here f
For the answer to your question take a look at the following URL:
http://soldc.sun.com/polls/index.jshtml
Brad Handy
--www.jack-of-all-trades.net
[EMAIL PROTECTED]
> -Original Message-
> From: Camilo Gonzalez [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, July 11, 2001 10:35 A
I have the following code segment:
for ($count=1;$count<11;$count++)
{
$c=getc;
$count=1;
print "blah\n";
if (ord($c) eq 10)
{
print "Stopping..."
$count = 12;
}
}
I'm trying to get it so it prints a bunch of "blah's"
until I hit the enter key, at which point it will say
that it is stopping. Ho
Hello Bradley,
Wednesday, July 11, 2001, Bradley M. Handy <[EMAIL PROTECTED]> wrote:
BMH> #!/path/to/perl
BMH> use CGI;
print CGI->>param();
BMH> print "I'm Working";
BMH> I believe the above lines of code should work just fine.
your script does not print content/type, so it produces error
Dear fliptop:
Yes sir! That is exactly what I want to do.
>Teresa Raymond wrote:
>>
>> OK, I am a relative novice to Programming, Perl, CGI, CGI.pm and
>> MIME::Lite. As suggested by others on this list I'm using MIME::Lite.
>> I've written the below code with part of a MIME::Lite example copie
Just in case someone interested in the answer, the following looks like
the correct one.
> what is the correct way for letting the user to download the binary
> file as script's response ?
#!/usr/bin/perl
use CGI qw(:standard);
print header;
print << 'STOP';
Text, usually
Dear all, I have the following script (see below) that I would like to
interface.
#!/bin/csh -f
column.pl $1 50 > tmp1 # perl program. tmp1 is a one column file
H.py $1 > tmp2< $1.out <
nothing
Enter a short name for your alignment:
Enter your Local alignment file (CLUSTA
Bradley,
When I use:
print "$_ - " . $cookie{$_}->value . "";
I get "Can't call method "value" on an undefined value"!
Any ideas?
Thanks,
Jerry
"Bradley M. Handy" wrote:
>
> > -Original Message-
> > From: Jerry Preston [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, July 11, 2001
I've been writing PERL scripts for over two years now. It's the only type of
CGI I know. Would any of you more seasoned programmers say that there's
still a market for PERL programmers? I've read of Python and possibly PHP
taking over PERL's place as THE CGI language. I've also heard ASP takes up
#!/path/to/perl
use CGI;
print CGI->param();
print "I'm Working";
I believe the above lines of code should work just fine.
> -Original Message-
> From: john.twycross [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, July 11, 2001 10:25 AM
> To: [EMAIL PROTECTED]
> Subject: test script
>
I believe that you can get the same functionality from the 'getc' function
in PERL. Although I believe that 'getch' returned the 'character' you
pressed not a variable.
Brad Handy
--www.jack-of-all-trades.net
[EMAIL PROTECTED]
> -Original Message-
> From: Thomas Jakub [mailto:[EMAIL P
Gotta know a few things ahead of time: what kind of server (Windows or
UNIX) and the location of the perl interpreter.
Making some gross assumptions, try:
#!/usr/local/bin/perl -w
print "Content-type: text/html\n\n";
print "Hello World!\n";
---
Next, see if the server has CGI installed:
#!/u
> if a program spawns multiple children, does that mean
> it has multiple threads?
no, that means is has multiple processes
you'll be able to see them (if you are fast enough :)
by typing
ps axuw
on the command prompt of your UNIX system
Perl isn't too good at threading
-- Gabor
--
Gab
$c = getc(STDIN);
or in shorter way
$c = getc;
then
ord($c);
returns the ascii value
so in short
ord(getc());
-- Gabor
On 2001.07.11 17:14 Thomas Jakub wrote:
> In c++, there is a functio, getch(), which returns the
> variable of the key you pressed - like enter would be
> 13. How could I do
Can anyone tell me what is the most basic script that I can load onto a
server to test that it is working?
Thanks
John Twycross
if a program spawns multiple children, does that mean
it has multiple threads?
__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/
In c++, there is a functio, getch(), which returns the
variable of the key you pressed - like enter would be
13. How could I do this in perl?
__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/
> -Original Message-
> From: Jerry Preston [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, July 11, 2001 7:29 AM
> To: cgi
> Subject: cookies
>
>
> Hi!
>
> I guess I am missing the boat. I have read CGI::Cookie and
> played with the code, but I would think that I should be able to
> read
> From: Mark Ross [mailto:[EMAIL PROTECTED]]
> Subject: How to make a script run in the background on a Win32 machine
>
> [---8<--- Run script in the background on a Win32 machine --8<--]
Mark,
I like to use Fire Daemon; http://www.firedaemon.com/. Fire Daemon helps
you set up Perl scripts as s
Hi!
I guess I am missing the boat. I have read CGI::Cookie and played with the code, but
I would think that I should be able to read the netscape cookies
file in by NT system. My script is running on a unix server. Is this possible. I
have tried to set a cookie and the read it, no luck.
Thomas Jakub wrote in message
<[EMAIL PROTECTED]>...
>How can I tell how much time a program has been
>running for in a perl script? I tried to do $time01 =
>localtime() and $time02 = localtime() and then
>subtract $time01 from $time02, but I always get zero,
>even though there was about five or
Daniel Falkenberg wrote in message
<[EMAIL PROTECTED]>...
>List,
>
>I would like to be able to move a row from one table to another table
within
>the same database.
>
>Off the top of my head I suppose the SQL command would look similar to the
>following...
>
>my $sql = 'MOVE * FROM table1 WHERE u
At 12:28 PM 07/11/2001 +0200, Greg wrote:
>Hi,
>I want to make an automatic script e add/delete users pop3 account ...
>Does anyone have suggestions to help me out ?
Check out your best friend, CPAN.
http://search.cpan.org/Catalog/Mail_and_Usenet_News/
Aloha,
mel
Teresa Raymond wrote:
>
> OK, I am a relative novice to Programming, Perl, CGI, CGI.pm and
> MIME::Lite. As suggested by others on this list I'm using MIME::Lite.
> I've written the below code with part of a MIME::Lite example copied.
> I've put the whole code here because I'm not sure what to le
Hi,
I want to make an automatic script e add/delete users pop3 account ...
Does anyone have suggestions to help me out ?
Thanks!
Greg.
hi!!!
i just wanted to know if i can use any built in
function or utility in perl which can help me to
simulate the effect of
clrscr() function in C or 'cls' in dos shell...
seemanta...
__
Do You Yahoo!?
Get personalized email ad
At 02:53 AM 07/11/2001 -0700, cool sexy wrote:
>i just wanted to know if i can use any built in
>function or utility in perl which can help me to
>simulate the effect of
>clrscr() function in C or 'cls' in dos shell...
use system(), e.g.,
system ('cls');
aloha,
mel
___
i just wanted to know if i can use any built in
function or utility in perl which can help me to
simulate the effect of
clrscr() function in C or 'cls' in dos shell...
seemanta...
__
Do You Yahoo!?
Get personalized email addresses from Yaho
At 09:22 10.07.2001 -0600, Ken Scott wrote:
>On Tue, 10 Jul 2001, Aaron Craig wrote:
>
> > At 12:21 09.07.2001 -0400, fliptop wrote:
> >
> > >why reinvent the wheel?
> >
> > I like my wheel better? :)
>
>But a wheel is just a wheel. Why not use the one that exists, and leave
>your mental energy an
This sounds like a server configuration error. Are you positive that the
server is configured correctly, that you have your Perl exe in the path and
that you've set up your cgi-bin correctly?
At 02:51 11.07.2001 -0400, Moon, John wrote:
>If you supply the code for the programs we may be able
54 matches
Mail list logo