Hi,
Does anyone know is it possible to include javascript in perl?
**
This document is strictly confidential and is intended for use by
the addressee unless otherwise indicated.
Allied Irish Banks
**
On Wednesday, Oct 29, 2003, at 07:48 US/Pacific, mark o' sullivan wrote:
Hi,
Does anyone know is it possible to include javascript in perl?
yes.
it is 'just more mark up' as far as the
CGI code is concerned on the 'sending side'
and only becomes relevant on the 'browser'
side that it be 'coherent
Can someone please help me find the syntax error in the following
practice exercise. The perl compiler says: syntax error at line 7 near
") {" but I cannot see it!
#!/usr/bin/perl -w
print "Enter the radius: \n";
chomp ($radius = );
$area = $radius*$radius*3.14
if ( $radius <= 0 ) {
pr
I believe that you need a semicolon after $area = $radius*$radius*3.14
Try that.
Andrew
-Original Message-
From: Rick Triplett [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 29, 2003 11:29 AM
To: [EMAIL PROTECTED]
Subject: help with syntax error
Can someone please help me find the
On Wednesday, Oct 29, 2003, at 08:28 US/Pacific, Rick Triplett wrote:
#!/usr/bin/perl -w
print "Enter the radius: \n";
chomp ($radius = );
$area = $radius*$radius*3.14
--^
normally that would need to have a ";"
to close it out.
if ( $radius <= 0 ) {
print "Th
Friends: Here's a nice mystery for you. I've been losing sleep over it
for about six weeks. No one on the Community Board at my host has been
able to suggest a solution.
The cgi in question is the following script, Example 3-4 from the the
Mouse book, as corrected from the Oreilly web site:
#!
On Wednesday, Oct 29, 2003, at 09:23 US/Pacific, Rick Triplett wrote:
Inserting print statements to print out the variables for examination,
I found that $image_path was
/big/dom/xreason/www/images/tour.jpeg (document_root on my server
is /big/dom/xreason/www )
I think this is the correct pat
Sara,
You're unlink() statement is correct and should work fine. What errors, if
any, are you getting?
Anthony
- Original Message -
From: "Sara" <[EMAIL PROTECTED]>
To: "beginners-cgi" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, October 29, 2003 12:44 PM
Subject: unlink
Here is one way, there are probably more elegant ways out there:
opendir DIR,"/home/path/to/dir";
@list = readdir DIR;
foreach $file (@list) {
unlink $file if $file =~ m/\.bak$/;
}
closedir DIR;
-Original Message-
From: Sara [mailto:[EMAIL PROTECTED]
Sent: October 29, 2003 1
Another way ...
opendir REMOVEIT, $dir or die "Open Failed";
my @gone = grep /\.bak$/ , map "$dir/$_". readdir REMOVEIT;
closedir REMOVEIT;
print "Remove ", join(',', @gone), "? :";
my $cnt;
if (<> =~ /y/i) {
$cnt = unlink @gone;
print "Removed $cnt files from $dir ending in .bak\n" if (
unlink <*.bak>;
how I am supposed to specify directory above?
for example I have to apply above unlink command to delete all backup files in the
Specified directory.
$dir = /home/path/to/dir
is it right?
unlink <$dir/*.bak>;
??
Any ideas?
Thanks,
Sara.
>
> unlink <*.bak>;
>
> how I am supposed to specify directory above?
>
> for example I have to apply above unlink command to delete all backup
files in the Specified directory.
>
> $dir = /home/path/to/dir
>
> is it right?
>
> unlink <$dir/*.bak>;
>
> ??
>
> Any ideas?
>
The <> operato
Thanks,
Thats the point, I wanted to confirm.
Sara.
- Original Message -
From: "Wiggins d Anconia" <[EMAIL PROTECTED]>
To: "Sara" <[EMAIL PROTECTED]>; "beginners-cgi"
<[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Thursday, October 30, 2003 2:03 AM
Subject: Re: unlink help.
>
>
> >
>
13 matches
Mail list logo