[25446] in Perl-Users-Digest
Perl-Users Digest, Issue: 7691 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Jan 25 18:10:35 2005
Date: Tue, 25 Jan 2005 15:10:23 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Tue, 25 Jan 2005 Volume: 10 Number: 7691
Today's topics:
frames with perl? <nospam@nospam.tv>
Re: frames with perl? <shawn.corey@sympatico.ca>
Re: frames with perl? <jgibson@mail.arc.nasa.gov>
Re: frames with perl? <jds@atavailcheck.com>
Re: Google Groups (was Re: "Can't modify non-lvalue sub (Anno Siegel)
Re: Google Groups (was Re: "Can't modify non-lvalue sub <abigail@abigail.nl>
Grep Text File for Lines Containing 1 or 2 Words <jc_va@hotmail.com>
Re: Grep Text File for Lines Containing 1 or 2 Words <1usa@llenroc.ude.invalid>
Re: Grep Text File for Lines Containing 1 or 2 Words <terrylr@blauedonau.com>
Re: How to compare files? <bik.mido@tiscalinet.it>
How to test for 'being run through require/do'? <jkrugman345@yahbitoo.com>
Re: How to test for 'being run through require/do'? <jgibson@mail.arc.nasa.gov>
Re: How to test for 'being run through require/do'? (Anno Siegel)
Re: How to test for 'being run through require/do'? (Anno Siegel)
need assistance with an inherited script that process e catcher39@www.com
Re: need assistance with an inherited script that proce <terrylr@blauedonau.com>
Re: Negative lookahead regex clarification needed <shifty_MyU@yahoo.com>
Re: Negative lookahead regex clarification needed <shifty_MyU@yahoo.com>
Re: Negative lookahead regex clarification needed (Anno Siegel)
Old tutorial - now corrected (Binny V A)
Re: Old tutorial - now corrected <1usa@llenroc.ude.invalid>
qiuckie for creating a file with date in name laredotornado@zipmail.com
Re: qiuckie for creating a file with date in name <mritty@gmail.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Tue, 25 Jan 2005 17:43:58 +0100
From: "PHP2" <nospam@nospam.tv>
Subject: frames with perl?
Message-Id: <ct5ss3$2eo$1@ls219.htnet.hr>
can I create frame inside in total middle of document with Perl? if yes,
how?
------------------------------
Date: Tue, 25 Jan 2005 12:02:04 -0500
From: Shawn Corey <shawn.corey@sympatico.ca>
Subject: Re: frames with perl?
Message-Id: <fYuJd.531$mA5.204644@news20.bellglobal.com>
PHP2 wrote:
> can I create frame inside in total middle of document with Perl? if yes,
> how?
>
>
No.
$ perldoc -q frame
No documentation for perl FAQ keyword `frame' found
--- Shawn
------------------------------
Date: Tue, 25 Jan 2005 09:23:02 -0800
From: Jim Gibson <jgibson@mail.arc.nasa.gov>
Subject: Re: frames with perl?
Message-Id: <250120050923025023%jgibson@mail.arc.nasa.gov>
In article <ct5ss3$2eo$1@ls219.htnet.hr>, PHP2 <nospam@nospam.tv> wrote:
> can I create frame inside in total middle of document with Perl? if yes,
> how?
Perl doesn't have 'frames'. Is this a CGI question?
If so, put 'use CGI;' in your Perl program to load the CGI module.
Then do 'perldoc CGI' on a command line, search for "WORKING WITH
FRAMES", and follow the advice given there.
----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= East/West-Coast Server Farms - Total Privacy via Encryption =---
------------------------------
Date: Tue, 25 Jan 2005 17:37:51 GMT
From: "Julia De Silva" <jds@atavailcheck.com>
Subject: Re: frames with perl?
Message-Id: <PtvJd.4244$MR3.392@fe1.news.blueyonder.co.uk>
Lookup in HMTL <iframe>
J
------------------------------
Date: 25 Jan 2005 17:42:45 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Google Groups (was Re: "Can't modify non-lvalue subroutine call" furrows my brow)
Message-Id: <ct60el$6j6$2@mamenchi.zrz.TU-Berlin.DE>
Tad McClellan <tadmc@augustmail.com> wrote in comp.lang.perl.misc:
> bik.mido@gmail.com <bik.mido@gmail.com> wrote:
> > Anno Siegel wrote:
> >> rickcasey <rick@rickcasey.net> wrote in comp.lang.perl.misc:
> >>
> >> > You are right; something else was going on.
> >>
> >> Please give an attribution and quote some context when replying.
>
>
> > The problem is with Google:
>
>
> I finally gave up waiting for that problem to go away.
>
> Last weekend I added a scorefile entry for postings from google. :-(
It's an archive with a posting facility, not an NNTP server. If it weren't
*Google*, I'd shrug it off.
Anno
------------------------------
Date: 25 Jan 2005 21:20:12 GMT
From: Abigail <abigail@abigail.nl>
Subject: Re: Google Groups (was Re: "Can't modify non-lvalue subroutine call" furrows my brow)
Message-Id: <slrncvde0c.ev3.abigail@alexandra.abigail.nl>
Anno Siegel (anno4000@lublin.zrz.tu-berlin.de) wrote on MMMMCLXV
September MCMXCIII in <URL:news:ct60el$6j6$2@mamenchi.zrz.TU-Berlin.DE>:
^^
^^ It's an archive with a posting facility, not an NNTP server. If it weren't
^^ *Google*, I'd shrug it off.
Avoiding Google isn't a bad thing: http://www.google-watch.org/.
Abigail
--
map{${+chr}=chr}map{$_=>$_^ord$"}$=+$]..3*$=/2;
print "$J$u$s$t $a$n$o$t$h$e$r $P$e$r$l $H$a$c$k$e$r\n";
------------------------------
Date: Tue, 25 Jan 2005 16:50:17 -0500
From: "Buck Turgidson" <jc_va@hotmail.com>
Subject: Grep Text File for Lines Containing 1 or 2 Words
Message-Id: <qhric2-maa.ln1@turf.turgidson.com>
Looking for help in writing a perl that will pull from a text file those
lines containing one or two "words". I want to reject any line that
contains more than 2 words (a sentence).
Appreciate any help from text processing experts.
------------------------------
Date: Tue, 25 Jan 2005 22:38:23 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: Grep Text File for Lines Containing 1 or 2 Words
Message-Id: <Xns95E9B37A84724asu1cornelledu@127.0.0.1>
"Buck Turgidson" <jc_va@hotmail.com> wrote in news:qhric2-maa.ln1
@turf.turgidson.com:
> Looking for help in writing a perl that will pull from a text file those
> lines containing one or two "words". I want to reject any line that
> contains more than 2 words (a sentence).
>
> Appreciate any help from text processing experts.
What have you done so far?
This is a good time to read the posting guidelines for this group and
follow them in your next post.
Sinan.
------------------------------
Date: Tue, 25 Jan 2005 16:42:23 -0600
From: "terry l. ridder" <terrylr@blauedonau.com>
Subject: Re: Grep Text File for Lines Containing 1 or 2 Words
Message-Id: <Pine.LNX.4.61.0501251639170.10568@johann.blauedonau.com>
On Tue, 25 Jan 2005, Buck Turgidson wrote:
> Looking for help in writing a perl that will pull from a text file those
> lines containing one or two "words". I want to reject any line that
> contains more than 2 words (a sentence).
>
need more information before i would attempt an answer.
leading and trailing whitespace important?
what is a "word" exactly?
is 1024 a "word" or a number?
is iixx a "word" or a number ( roman numerial )?
>
> Appreciate any help from text processing experts.
>
>
--
terry l. ridder ><>
------------------------------
Date: Tue, 25 Jan 2005 20:53:49 +0100
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: How to compare files?
Message-Id: <kq7dv01m8blh5os6ngi8jk7jmr5hoau5jj@4ax.com>
On 21 Jan 2005 00:43:45 GMT, Eric Bohlman <ebohlman@omsdev.com> wrote:
>Michele Dondi <bik.mido@tiscalinet.it> wrote in
>news:ksnsu0h8aje6nvcinlg5s8ut1efq9mr8ml@4ax.com:
>
>> You're perfectly right. Re-reading what I wrote I realize that it
>> seems to suggest that equality of MD5 sums is a necessary condition
>> for equality of files, which indeed is _not_ the case[*]. I apologize
>> to the OP for the inexactness of my claim.
>
>Oh, but it *is* a *necessary* condition. What it isn't is a *sufficient*
>condition. You're the first person I've seen who's reversed the sense of
When I first read your post my gut reaction at first was along the
lines of "what's this idiot saying?" but on a second thought I
realized that _I_ am the idiot...
>those particular terms, though confusing the underlying logical
>propositions is extremely common and leads to some nasty fallacies
>(affirming the consequent and denying the antecedent).
Well, FWIW I assure you that I'm perfectly familiar with the concepts
and AFAICT I've never reversed them. Probably I was simply too tired
when I posted this, and I thank you for correcting my gross mistake.
I have already apologized for an error included in an apologizing.
explanation to another error. Hopefully this time I've kept low
profile enought that I shouldn't have added any more so that I won't
need to apologize once again...
;-)
Michele
--
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
.'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,
------------------------------
Date: Tue, 25 Jan 2005 18:49:33 +0000 (UTC)
From: J Krugman <jkrugman345@yahbitoo.com>
Subject: How to test for 'being run through require/do'?
Message-Id: <ct64bt$4ok$1@reader1.panix.com>
Is there any way a Perl script can tell whether it is being run
directly from the command line or as the result of a require (or
do) statement in some other Perl script?
TIA!
jill
--
To s&e^n]d me m~a}i]l r%e*m?o\v[e bit from my a|d)d:r{e:s]s.
------------------------------
Date: Tue, 25 Jan 2005 11:17:12 -0800
From: Jim Gibson <jgibson@mail.arc.nasa.gov>
Subject: Re: How to test for 'being run through require/do'?
Message-Id: <250120051117127210%jgibson@mail.arc.nasa.gov>
In article <ct64bt$4ok$1@reader1.panix.com>, J Krugman
<jkrugman345@yahbitoo.com> wrote:
> Is there any way a Perl script can tell whether it is being run
> directly from the command line or as the result of a require (or
> do) statement in some other Perl script?
Look at the $0 variable to get the name of the Perl file being
executed. If it doesn't match the name of the file doing the looking,
then it wasn't executed directly from the command line.
----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= East/West-Coast Server Farms - Total Privacy via Encryption =---
------------------------------
Date: 25 Jan 2005 19:19:52 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: How to test for 'being run through require/do'?
Message-Id: <ct664o$9ki$1@mamenchi.zrz.TU-Berlin.DE>
J Krugman <jkrugman345@yahbitoo.com> wrote in comp.lang.perl.misc:
>
>
> Is there any way a Perl script can tell whether it is being run
> directly from the command line or as the result of a require (or
> do) statement in some other Perl script?
In short, if all you want to know is if your script is called top level,
check if "caller" returns something true on the scripts top level.
if ( caller ) {
# we're called from somewhere else
} else {
# called top level
}
For more specific aspects, look for "is_require" in perldoc -f caller.
Anno
------------------------------
Date: 25 Jan 2005 19:27:12 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: How to test for 'being run through require/do'?
Message-Id: <ct66ig$9ki$2@mamenchi.zrz.TU-Berlin.DE>
Jim Gibson <jgibson@mail.arc.nasa.gov> wrote in comp.lang.perl.misc:
> In article <ct64bt$4ok$1@reader1.panix.com>, J Krugman
> <jkrugman345@yahbitoo.com> wrote:
>
> > Is there any way a Perl script can tell whether it is being run
> > directly from the command line or as the result of a require (or
> > do) statement in some other Perl script?
>
> Look at the $0 variable to get the name of the Perl file being
> executed. If it doesn't match the name of the file doing the looking,
> then it wasn't executed directly from the command line.
That is not a recommendable method. Not only is $0 system-dependent,
there are also hard and soft links (and possibly other aliasing methods)
to consider.
Use caller() instead.
Anno
------------------------------
Date: 25 Jan 2005 09:59:05 -0800
From: catcher39@www.com
Subject: need assistance with an inherited script that process email
Message-Id: <1106675945.322274.160710@z14g2000cwz.googlegroups.com>
This perl script goes through a list of files in IFILE and for each
file, it sends it on to sendmail. Attachments need special handling and
are signified in the email-file by having a line start with 3@ folowed
by the name of the file that should be attached.
[QUOTE]
{
open IFILE,"$ifile";
$ofile="$_.mail";
open OFILE,">$ofile";
$fromaddr="PostMaster\@afts.com";
while(<IFILE>)
{
chomp;
if(substr($_,0,3) eq "\@\@\@")
{
chomp($basename=substr($_,3,(length $_)-4));
chomp($aname="/mnt/opserve/automail/ATTACH/" . $basename);
chomp($base="$aname.base64");
system "cat $aname | /usr/bin/mimencode -o $base";
print OFILE "\n--Message-Boundary--\n";
print OFILE "Content-type: Application/octet-stream;
name=\"$basename\"\n";
print OFILE "Content-transfer-encoding: BASE64\n\n";
close OFILE;
system "cat $base >> $ofile";
open OFILE,">>$ofile";
system "cp $base /usr/mailAttached/`date +%d`/";
system "rm -f $base";
system "rm -f $aname";
print OFILE "\n--Message-Boundary--\n";
};
if(substr($_,0,5) eq "From:")
{
$fromaddr=(substr($_,5));
};
if(substr($_,0,3) ne "\@\@\@")
{
print OFILE $_ ."\n";
};
}
close IFILE;
[/QUOTE]
There are 3 problems:
1) There has to be a way of doing this without all those system calls,
no?
2) this Line does not always get processed:
"cp $base /usr/mailAttached/`date +%d`/"
3) sometimes the text string of
; type=Binary
gets added after the basename in the output of OFILE. The result is
Content-type: Application/octet-stream;
name=Cycle108.zip; type=Binary
instead of
Content-type: Application/octet-stream;
name=Cycle108.zip
this hurts as several email clients seem to have problems parsing the
attached filename correctly.
------------------------------
Date: Tue, 25 Jan 2005 13:28:39 -0600
From: "terry l. ridder" <terrylr@blauedonau.com>
Subject: Re: need assistance with an inherited script that process email
Message-Id: <Pine.LNX.4.61.0501251321030.6265@johann.blauedonau.com>
On Tue, 25 Jan 2005 catcher39@www.com wrote:
> This perl script goes through a list of files in IFILE and for each
> file, it sends it on to sendmail. Attachments need special handling and
> are signified in the email-file by having a line start with 3@ folowed
> by the name of the file that should be attached.
<snip>
there are numerous other ways to accomplish the intent of the snipped
code.
> There are 3 problems:
<snip>
there are more than 3 problems with that code you posted.
there is absolutely no error checking being done anywhere.
every 'open' should be checked to see if it succeeded.
>
> this hurts as several email clients seem to have problems parsing the
> attached filename correctly.
>
there are many broken e-mail clients out in the wild. it makes no sense
to keep breaking numerous rfc's so that the broken e-mail clients may
still be used. fix/replace the e-mail clients.
--
terry l. ridder ><>
------------------------------
Date: 25 Jan 2005 13:37:56 -0800
From: "shifty" <shifty_MyU@yahoo.com>
Subject: Re: Negative lookahead regex clarification needed
Message-Id: <1106689076.623171.320730@c13g2000cwb.googlegroups.com>
> No, I don't know where to raise questions specifically about regexes,
> either. But the Perl regulars seem quite a bit more tolerant of
> off-topically regex-related questions here, than they are about
> off-topically CGI questions here :-}
For that, I'm really thankful. Nothing like getting your ass lit up by
someone when you truly mean well, look twice to make sure you're trying
to do the right thing, then you get flamed to holy hell for trying to
be as cautious and netiqueete-oriented as possible. :D
------------------------------
Date: 25 Jan 2005 13:50:09 -0800
From: "shifty" <shifty_MyU@yahoo.com>
Subject: Re: Negative lookahead regex clarification needed
Message-Id: <1106689809.836925.241520@z14g2000cwz.googlegroups.com>
> Something is going to compile it. Every regex engine in existence
> does that.
I would guess they're never compiled - regexes are interpreted, eh?
So, in essence, if I am writing a regex for perl in particular (we'll
keep it on-topic), perl is an interpreted language and so is a regex,
so it's processed on the fly instead of compiling it into an object for
future use. Unless I'm misinterpreting your use of "compile". If so,
I have a true interest in understanding if you don't mind explaining.
> My point was the misuse of "syntax" for "correct code". It's
becoming a
> sore spot.
My apologies. I think we have conflicting views on what a regex really
is. To me, a regex is a sentence or formula which expresses any number
of meanings. Without the correct characters pattern (and/or placement)
within the text (and/or string), you don't have a correct statement.
If you don't produce a correct statement because one or more characters
are misplaced, is it a syntax error or a code error?
> That's inconclusive, but since you didn't say what your spam filter
> actually does with the regex, there's no way of telling.
I use these regex expressions for both SpamAssassin and Vamsoft's Open
Relay Filter EE. Depends on which mailserver I'm dealing with
(personal, co-hosted or business). I primarily do more administration
and hosting type stuff than I do programming - if that's not blatantly
obvious already.
Thanks for your input, looking forward to clarification.
>
> Anno
------------------------------
Date: 25 Jan 2005 22:18:14 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Negative lookahead regex clarification needed
Message-Id: <ct6gj6$fo8$1@mamenchi.zrz.TU-Berlin.DE>
shifty <shifty_MyU@yahoo.com> wrote in comp.lang.perl.misc:
>
> > Something is going to compile it. Every regex engine in existence
> > does that.
>
> I would guess they're never compiled - regexes are interpreted, eh?
> So, in essence, if I am writing a regex for perl in particular (we'll
> keep it on-topic), perl is an interpreted language and so is a regex,
> so it's processed on the fly instead of compiling it into an object for
> future use. Unless I'm misinterpreting your use of "compile". If so,
> I have a true interest in understanding if you don't mind explaining.
Processing on-the-fly and compilation don't exclude one another. Both
Perl and, on another level, regular expressions, are first compiled
into a more readily executable form and then immediately executed.
There is still a distinct compilation phase for both, and this is the
phase where syntax is checked and syntax errors are detected.
In particular, a regular expression is not interpreted character by
character, but first translated into something else (often, but not
always, a model of a finite-state machine). There's a whole theory
about that.
> > My point was the misuse of "syntax" for "correct code". It's
> becoming a
> > sore spot.
>
> My apologies. I think we have conflicting views on what a regex really
> is. To me, a regex is a sentence or formula which expresses any number
> of meanings. Without the correct characters pattern (and/or placement)
> within the text (and/or string), you don't have a correct statement.
>
> If you don't produce a correct statement because one or more characters
> are misplaced, is it a syntax error or a code error?
If the regex engine cannot translate your string, it's a syntax error.
If it can, but the result doesn't match the intended set of patterns,
it's a semantic error. Both are coding errors.
Your description "without the correct character pattern ... you don't
have a correct statement" covers both kinds of errors. "Syntax error"
means only one.
Anno
------------------------------
Date: 25 Jan 2005 11:47:16 -0800
From: binnyva@hotmail.com (Binny V A)
Subject: Old tutorial - now corrected
Message-Id: <68cd8f94.0501251147.49fd5efc@posting.google.com>
I am the author of the "Beginner's Tutorial for CGI
Perl Language" at
http://www.geocities.com/binnyva/code/perl/tutorial/index.html
This is a tutorial for the perl language. Teaches how
to develop CGI(Common Gateway Interface) perl programs
for websites.
It was the subject of a few posts a couple of months ago -
http://tinyurl.com/3l2t2
I believe that I have corrected all the problems that
were pointed out in those posts. Anyone interested can
take a look at it. If you notice any more errors, please
let me know. I certainly expect to find some after
seeing the results of my previous attempt. After all
that is debugging - taking out old bugs and putting
in new ones. ;-)
PS : Sorry about the delay in repairing the tutorial.
Thank You,
Binny V A
http://www.geocities.com/binnyva/code
------------------------------
Date: Tue, 25 Jan 2005 20:28:16 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: Old tutorial - now corrected
Message-Id: <Xns95E99D6B5E2D9asu1cornelledu@127.0.0.1>
binnyva@hotmail.com (Binny V A) wrote in
news:68cd8f94.0501251147.49fd5efc@posting.google.com:
> I am the author of the "Beginner's Tutorial for CGI
> Perl Language" at
> http://www.geocities.com/binnyva/code/perl/tutorial/index.html
...
> It was the subject of a few posts a couple of months ago -
> http://tinyurl.com/3l2t2
>
> I believe that I have corrected all the problems that
> were pointed out in those posts. Anyone interested can
> take a look at it. If you notice any more errors, please
> let me know.
OK. I'll bite. You know, you could make it much easier for people to
comment if we could just see the source code on your site rather than
having to download a zip and extract the source etc etc.
My comments pertain to:
# Name Of Script : Message Board
#
# Version : 1.00.A
First thing I noticed is that there is still no
use strict;
That is kind of obnoxious of you.
> # Set Variables
> $file = "message_board.html"; # The File where the message
> board is displayed
> $messagesfile = "messages.html"; # The file that stores all the
> messages
> $seperator = "-"; # Date sepeator (9'-'10..)
First off, do away with useless right margin comments such as these.
Second, the word is spelled 'separator'. Third, you are better off using
a hash for this sort of thing:
my %config = (
board_file => 'message_board.html',
messages_file => 'messages.html',
date_separator => '-',
);
Now, the kicker:
> # Get input
> my $value;
> if ($ENV{'REQUEST_METHOD'} eq "GET")
> {
> $value = $ENV{'QUERY_STRING'};
> }
> else
> {
> $value = <STDIN>;
> }
Oh, get ready for fun CGI parsing ...
use CGI ':standard';
$CGI::POST_MAX = 100*1024;
$CGI::DISABLE_UPLOADS = 1;
> # Take time to make things happen
> ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime
> (time);
> $year = $year - 100;
> $mon++;
> $date = "$mday$seperator$mon$seperator200$year";
It looks like you still haven't read the responses to your original
postings. Neither have you bothered to look at
perldoc -f localtime
What if the year is 2014? Then, $date above will be set to
"26-1-20014". Do you think that is correct? If so, you are even more
dimwitted than I give you credit for.
Encapsulate this in a sub:
sub formatted_date {
my $separator = shift;
my ($mday, $month, $year) = (localtime time)[3, 4, 5];
sprintf('%2.2d%s%2.2d%s%4.4d',
$mday,
$separator,
++$month,
$separator,
1900 + $year
);
}
I cannot remember the name of the module on CPAN that deals with
formatting dates according to the RFC whose number I cannot remember
(here is an idea, why don't you search CPAN yourself and find the
appropriate date formatting module?)
> # Making the input English. And removing unwanted things
WTF does this mean? What if I posted something in Turkish on this site?
Have you written a translator for Turkish -> English that Google does
not know about?
> $value =~ s/%(..)/pack("c", hex($1))/ge;
> $value =~ s/comments\=//gi;
> $value =~ s/\+/ /gi;
> $value =~ s/\n/<BR>/gi;
> # Catogarizing the input
Speaking of English ...
> @value = split(/&/, "$value" );
> $comments = $value[0];
Please do everyone a favor and use CGI.pm.
> # Open Guest Book File
> open (FILE, "$messagesfile") ||
Useless use of quotes. See
perldoc -q always
> print "Can't open $messagesfile: $!\n";
> @LINES=<FILE>;
> close(FILE);
> $SIZE=@LINES;
We have been through this once before. You try to open a file. If there
is an error, you print something and continue on to read lines from the
file that you failed to open.
Finally, I urge everyone to stay away from scripts that allow people to
write arbitrary amounts of data to your server's hard drive. Please.
Sinan.
------------------------------
Date: 25 Jan 2005 12:05:49 -0800
From: laredotornado@zipmail.com
Subject: qiuckie for creating a file with date in name
Message-Id: <1106683549.598578.240080@c13g2000cwb.googlegroups.com>
Hi, This group has been pretty unbelievable at coming up with quick one
or two line solutions to questions so I thought I'd throw this one out
there. I want to create a file containing a single word "Done" for
contents but I would like the file name to be of the form:
File_YYYYMMDD_HHMMSS.done
where YYYY is the four year date, MM is the month number, and so on..
What's the quickest way I could do this?
Thanks a million! - Dave
------------------------------
Date: Tue, 25 Jan 2005 20:30:56 GMT
From: "Paul Lalli" <mritty@gmail.com>
Subject: Re: qiuckie for creating a file with date in name
Message-Id: <40yJd.5757$cx2.1723@trndny03>
<laredotornado@zipmail.com> wrote in message
news:1106683549.598578.240080@c13g2000cwb.googlegroups.com...
> Hi, This group has been pretty unbelievable at coming up with quick
one
> or two line solutions to questions so I thought I'd throw this one out
> there. I want to create a file containing a single word "Done" for
> contents but I would like the file name to be of the form:
>
> File_YYYYMMDD_HHMMSS.done
>
> where YYYY is the four year date, MM is the month number, and so on..
> What's the quickest way I could do this?
probably by using localtime()
Something along the lines of
my @time = localtime(time);
my $file = sprintf("File_%4d%2d%2d_%2d%2d%2d.done",
$time[5]+1900,$time[4]+1, @time[3,2,1,0]);
read about localtime in
perldoc -f localtime
Paul Lalli
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>
Administrivia:
#The Perl-Users Digest is a retransmission of the USENET newsgroup
#comp.lang.perl.misc. For subscription or unsubscription requests, send
#the single line:
#
# subscribe perl-users
#or:
# unsubscribe perl-users
#
#to almanac@ruby.oce.orst.edu.
NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
#To request back copies (available for a week or so), send your request
#to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
#where x is the volume number and y is the issue number.
#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V10 Issue 7691
***************************************