Hughes, Andrew wrote:
I have a multi-table MySQL database that holds different pieces of
information that will all be displayed on a web page template. The general
principle is that non web people will be able to populate web pages through
an admin panel. The data in all of the MqSQL tables will
Yech, what a mess. I think you may need to escape the question mark and
or dots. In any case, why try to escape such an unwieldy string? Why not
use a heredoc? Laziness is the mark of a good programmer.
Mike Harrison wrote:
I was trying to find a log file to look at. I guess half the problem i
What web server is installed on that computer?
Some web servers need to use non parsed header scripts (NPH) and I heard
that this is the case with MS IIS if this is the web server.
The line break is not very important for perl scripts under Windows. I use
only the Unix end of line (lf) under Windo
On Fri, 8 Aug 2003 02:32:05 +0500, Sara wrote:
> open(NUMBER,">>data.txt");
> flock (NUMBER, 2);
> close (NUMBER);
> closing a file automatically removes the lock??
The answer is yes. When you close files they will automatically
un-locked.
One thing though, you might want to use the fcntl module
Would be interesting to see which is faster, there is that whole regex
engine thing. Of course to say that there are no letters isn't strictly
fair because you would need two lines of comments stating what you are
doing ;-)... depending on the context...
http://danconia.org
Hall, Scott wrote:
It depends how is set the web server to execute the programs that will
process the CGI scripts.
By default Apache is set to need the shebang line and it doesn't use the
registry settings, but this can be changed.
...and you don't need to print the HTML header in the BEGIN {} block.
You can just pr
I was trying to find a log file to look at. I guess half the problem is I
am using a hosting service, and it is on a Microsoft IIS server (Windows
NT-based I think, but definitely not UNIX). I will have to ask the hosting
admin where I might find a log file...
Here is the part of the perl script
good question. here are some sample scripts which should help...
the first one asks, how many elements are in a list if they are all undef
#!/usr/local/bin/perl
if ( (undef, undef) == 0 ) { print 'it is 0' }
run this, and you'll see that it prints 'it is 0'.
here's a second one that tests what
Hi everyone!
I`m looking for a way to "compile" a perl script into an executable
binary for a WIN2000 system (no(!) perl installed).
Is there a way to get this working?
Thanks for your help in advance
Sven
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PR
Hi all,
I want to select all the content of a table from a file using regular
expressions (and not a module).
Can you give me some hints about how can I do this?
For example I have the following text:
..
..
... ...
As you see, I could find more other tables included in th
eBay, Thanks. I learnt something there.
Equally, thanks to Bob, nice solution which I also didn't know.
Dave
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
On Mon, 11 Aug 2003 at 22:36, Octavian Rasnita opined:
[snip]
OR:I've tried chmodding the perl script to 755, and I've tried running it
OR:with:
OR:
OR:$ script.pl
OR:
OR:...but it didn't want to run, telling me that there is no command
OR:script.pl, even though the script has a shebang line in it
On Mon, 11 Aug 2003 11:33:40 +0300, [EMAIL PROTECTED] (Octavian Rasnita)
wrote:
>Hi all,
>
>Does anyone know why the perl scripts need to have the execute permission
>under Unix?
>
>I am asking this because I've seen that the PHP files don't need this
>permission.
>
>Couldn't perl just read a text
Sara wrote:
Simple Regex problem
How you will convert
$email = "[EMAIL PROTECTED]";
TO
$email = "[EMAIL PROTECTED]";
using Regex.
Well this isn't necessarily a regex issue, TMTOWTDI,
my $email = '[EMAIL PROTECTED]';
$email = substr($email, 0, (index($email,'@')+2));
print "Email: $email
Hi all,
Does anyone know why the perl scripts need to have the execute permission
under Unix?
I am asking this because I've seen that the PHP files don't need this
permission.
Couldn't perl just read a text file (doesn't matter if it has an execute
permission or not), interpret it and execute it
Octavian Rasnita wrote:
Hi all,
I want to select all the content of a table from a file using regular
expressions (and not a module).
Can you give me some hints about how can I do this?
Uh, use a module.
For example I have the following text:
..
..
... ...
As you see, I co
A quick question about a while loop.
I have a simple code that searches database for all entries and puts
one of the fields into a select box on the output page. However, due to
a mistake in my untaint routine (which I've fixed) if a visitor entered
their name in Japanese characters, the entry
And as a word of caution, some like to add '.' to their path in order to save typing
an extra two
letters ('./' in front of the file name). Don't do this, though, as this is a major
security
hole.
Using google to search for 'current directory path linux security hole' for many
examples of this
Hmm, are you telling that I can create a perl file and name it file.html,
file.php, or even file.asp, and use a shebang line in it, then it will be
parsed as a perl file?
Or I need to use extensions that are not set in the server's conf file to be
parsed as other types?
Teddy,
Teddy's Center: http
Thanks for the detailed answer. I have dealt with JOIN clauses briefly in
the past, but not in this context. I will have to revisit on my own. As
far as grabbing the unique id, I am definitely going to use the DBI module
for contacting MySQL. When I am looking at your piece of code, I had a few
Hi,
Im trying to install the Graphics-Simple module from CPAN on ActivePerl but
can't seem to get it to work. I ran the PPM install Graphics-Simple which
worked ok, but then I tried to run the test program gt1.pl and it gave me an
error about not having the Gtk module. I then went to CPAN to
2. My first line in the perl program is: #!perl -w (being a Windows-based
server, it doesn't require the full path. The -w to warn of errors/mistakes
etc.)
I think in Windows, -w isn't enough. The #!perl line is ignored in most
windows installations/configurations , and the file association is u
> "Kristofer" == Kristofer Hoch <[EMAIL PROTECTED]> writes:
Kristofer> This is what I do for security on my webserver. I don't have the
Kristofer> shebang line in my scripts. The webserver has a list of approved perl
Kristofer> script extensions. When it runs across a file with this extensi
Regexes are always more fun :) How else can you write a program with almost
no letters.
$email =~ s/(?<[EMAIL PROTECTED]).*$/.../;
perldoc perlre
search for 'look-behind'
Scott
-Original Message-
From: Wiggins d'Anconia [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 05, 2003 10:36 PM
...and you don't need to print the HTML header in the BEGIN {} block.
You can just print it at the top of the perl program or in the middle of the
program but before anything else is printed.
if something is dieing in a module you are loading, you will never know
about it because it will never ge
I've had some luck with perl2exe in the past. If I remember correctly,
you also have to deliver a couple of .dll's with the executable. Can you
turn the app into a web app? You might have more luck with that.
http://www.indigostar.com/perl2exe.htm
-Original Message-
From: Sven Bentlage [ma
Comments?? Who needs comments? My code is 'self-documenting' LOL
Scott
PS: The regex engine is your friend.
-Original Message-
From: Wiggins d'Anconia [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 06, 2003 8:08 PM
To: Hall, Scott
Cc: [EMAIL PROTECTED]
Subject: Re: Regex and Email
Oh, but I guess this is a little security improvement, not?
But now... another related question.
If the shebang line is not needed by the web server (if I will define an
action to run perl in httpd.conf), is the shebang line used for something
else?
I've tried chmodding the perl script to 755, an
Sven Bentlage wrote:
> Hi everyone!
>
> I`m looking for a way to "compile" a perl script into an executable
> binary for a WIN2000 system (no(!) perl installed).
>
> Is there a way to get this working?
I use ActiveState's PerlApp for this. It's really very nice.
It bundles everything into a sing
Greenhalgh David wrote:
> A quick question about a while loop.
>
> I have a simple code that searches database for all entries and puts
> one of the fields into a select box on the output page. However, due
> to a mistake in my untaint routine (which I've fixed) if a visitor
> entered their name i
> You should never be able to guess the implementation language by
> looking at a URL. Wrong. Wrong.
I couldn't agree more. None of my scripts are executed directly...IE
there is not script called 'index.pl'. Alternatly, I use HTML::Mason
for dynamic web content. The Mason handler calls the s
Okay then, how should scripts be called? Let's say I'm using a form.
What would the action be?
Kristofer Hoch wrote:
You should never be able to guess the implementation language by
looking at a URL. Wrong. Wrong.
I couldn't agree more. None of my scripts are executed directly...IE
there
> "Octavian" == Octavian Rasnita <[EMAIL PROTECTED]> writes:
Octavian> Hmm, are you telling that I can create a perl file and name
Octavian> it file.html, file.php, or even file.asp, and use a shebang
Octavian> line in it, then it will be parsed as a perl file?
Octavian> Or I need to use exte
I dual-boot my computer and I have three partitions, an NTFS partition
for Windows XP Pro, an ext3 filesystem for Linux (Red Hat Linux 9.0) and
a Fat32 filesystem for my data (because FAT32 is the only filesystem
both OS's play nicely with). I keep the data that I want shared stored
on this FAT
I have a multi-table MySQL database that holds different pieces of
information that will all be displayed on a web page template. The general
principle is that non web people will be able to populate web pages through
an admin panel. The data in all of the MqSQL tables will be entered by the
user
No, you don't need to add any dll files (at least with ActiveState Perl
Developer kit).
The perl interpreter is included in the .exe file by default. If you want
you can choose to not include it and only in that case the perl.dll file
needs to be used.
Teddy,
Teddy's Center: http://teddy.fcc.ro/
(sub get_number {
open(NUMBER,">>data.txt");
flock (NUMBER, 2);
Do blah blah blah
close (NUMBER);
closing a file automatically removes the lock?? or should I have to unlock it by
placing
flock (NUMBER, 8);
close (NUMBER);
My second question is how I can delay the execution of a script (If two
$recipient_email = [EMAIL PROTECTED];
When you send email using yahoo groups, it will show the recpient mail
address after sending mail like this...
Mail successfully sent to [EMAIL PROTECTED]
anybody can help me how to do it? that it will hide the domain except for
showing one character after @
Simple Regex problem
How you will convert
$email = "[EMAIL PROTECTED]";
TO
$email = "[EMAIL PROTECTED]";
using Regex.
Thanks,
Sara.
- Original Message -
From: gregg
To: Sara
Cc: [EMAIL PROTECTED]
Sent: Wednesday, August 06, 2003 6:59 AM
Subject: Re: Regex and Ema
39 matches
Mail list logo