[13205] in Perl-Users-Digest
Perl-Users Digest, Issue: 615 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Aug 22 15:07:24 1999
Date: Sun, 22 Aug 1999 12:05:08 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Sun, 22 Aug 1999 Volume: 9 Number: 615
Today's topics:
A reference to a number (Irwin Feuerstein)
Re: A reference to a number <perin@panix.com>
Re: A reference to a number (Abigail)
Re: A reference to a number (Irwin Feuerstein)
Apology <shori_pl@bigpond.net.au>
Calculating days, hrs, mins between 2 datestamps ... (TheEadsNet)
Re: Calculating days, hrs, mins between 2 datestamps .. (Abigail)
Re: Calculating days, hrs, mins between 2 datestamps .. (Michael Budash)
Re: determining a leap year (Peter J. Acklam)
File permissions and Errors <habfan2@my-deja.com>
Re: How to do "or" in IF test? <All@n.due.net>
Re: Maintaining User Sessions without Cookies (Benjamin Franz)
Re: Maintaining User Sessions without Cookies (Abigail)
make it find hebrew <office@tag.co.il>
matching tags in HTML (TSOI_WING_SHING)
Re: new to perl and a bit stupid <toby@venice.cas.utk.edu>
Re: Perl Email With Netscape (Abigail)
Re: Perl Email With Netscape <jimmy@blackhole-designs.com>
Re: Request for Comments: www.perl.com <cis78.11@shivan.com>
Re: Substitute <hanenkamp@networksplus.net>
The logic of curly braces (Irwin Feuerstein)
Re: The logic of curly braces (Abigail)
Re: vacation doesn't work with domain name. Alternative <neil@pacifier.com>
Re: Wacky Programming Tales (Mark W. Schumann)
Digest Administrivia (Last modified: 1 Jul 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sun, 22 Aug 1999 15:01:06 GMT
From: websites@erols.com (Irwin Feuerstein)
Subject: A reference to a number
Message-Id: <37c01058.137873627@news.erols.com>
In the brief tutorial to references and objects it says that sometimes
you want to construct a reference to a string, or to a number, instead
of a named variable. Why would you want to do that? What advantages do
you get?
------------------------------
Date: 22 Aug 1999 11:08:42 -0400
From: Lewis Perin <perin@panix.com>
Subject: Re: A reference to a number
Message-Id: <pc7lnb3c0p1.fsf@panix6.panix.com>
websites@erols.com (Irwin Feuerstein) writes:
> In the brief tutorial to references and objects it says that sometimes
> you want to construct a reference to a string, or to a number, instead
> of a named variable. Why would you want to do that? What advantages do
> you get?
You might want a constant:
[lew@prez lew]$ perl -e "my \$pi = \\3.14; print \"\$\$pi\n\";"
3.14
(Note that away from the command line you won't need to quote the
dollar signs, backslashes and quotes.)
Cheers, Lew
------------------------------
Date: 22 Aug 1999 11:00:00 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: A reference to a number
Message-Id: <slrn7s07lm.jkg.abigail@alexandra.delanet.com>
Lewis Perin (perin@panix.com) wrote on MMCLXXXII September MCMXCIII in
<URL:news:pc7lnb3c0p1.fsf@panix6.panix.com>:
<> websites@erols.com (Irwin Feuerstein) writes:
<>
<> > In the brief tutorial to references and objects it says that sometimes
<> > you want to construct a reference to a string, or to a number, instead
<> > of a named variable. Why would you want to do that? What advantages do
<> > you get?
<>
<> You might want a constant:
<>
<> [lew@prez lew]$ perl -e "my \$pi = \\3.14; print \"\$\$pi\n\";"
<> 3.14
<>
<> (Note that away from the command line you won't need to quote the
<> dollar signs, backslashes and quotes.)
And note that real shells quote the way Perl quotes. (Where do you think
Perl got the idea of ' and " from?) Also, take advantage of the -l switch:
$ perl -wle 'my $pi = \3.14; print $$pi'
Having said that, neither $pi, nor $$pi is much of a constant; as they
can trivially be assigned to.
Abigail
--
perl -e '* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
/ / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / /
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %;
BEGIN {% % = ($ _ = " " => print "Just Another Perl Hacker\n")}'
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: Sun, 22 Aug 1999 18:07:13 GMT
From: websites@erols.com (Irwin Feuerstein)
Subject: Re: A reference to a number
Message-Id: <37c03bf7.1217945@news.erols.com>
Why is that better than just using a constant from the beginning? That
way you eliminate the "my ...3.14".
On 22 Aug 1999 11:08:42 -0400, Lewis Perin <perin@panix.com> wrote:
>websites@erols.com (Irwin Feuerstein) writes:
>
>> In the brief tutorial to references and objects it says that sometimes
>> you want to construct a reference to a string, or to a number, instead
>> of a named variable. Why would you want to do that? What advantages do
>> you get?
>
>You might want a constant:
>
> [lew@prez lew]$ perl -e "my \$pi = \\3.14; print \"\$\$pi\n\";"
> 3.14
>
>(Note that away from the command line you won't need to quote the
>dollar signs, backslashes and quotes.)
>
>Cheers, Lew
------------------------------
Date: Mon, 23 Aug 1999 01:46:28 +1000
From: Shori Pty Ltd - Barry W Anderson <shori_pl@bigpond.net.au>
Subject: Apology
Message-Id: <37C01B54.6FE6967A@bigpond.net.au>
last inane post due to inattention + netscape + sleep calling
------------------------------
Date: 22 Aug 1999 15:08:12 GMT
From: theeadsnet@aol.com (TheEadsNet)
Subject: Calculating days, hrs, mins between 2 datestamps ...
Message-Id: <19990822110812.13887.00002282@ng-cq1.aol.com>
Does anyone know of a routine that will calculate the number of days, hours,
and minutes between two datestamps that consist of:
mm/dd/yyyy-hh:mm
If possible, not a Perl module, since my ISP won't allow me to install modules
on my server.
Much thanks.
Joe Halbrook
------------------------------
Date: 22 Aug 1999 11:02:05 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Calculating days, hrs, mins between 2 datestamps ...
Message-Id: <slrn7s07pl.jkg.abigail@alexandra.delanet.com>
TheEadsNet (theeadsnet@aol.com) wrote on MMCLXXXII September MCMXCIII in
<URL:news:19990822110812.13887.00002282@ng-cq1.aol.com>:
||
|| Does anyone know of a routine that will calculate the number of days, hours,
|| and minutes between two datestamps that consist of:
||
|| mm/dd/yyyy-hh:mm
There are a billion modules on CPAN out there that do such a thing.
|| If possible, not a Perl module, since my ISP won't allow me to install module
|| on my server.
Really? I find this very strange. How does your ISP determine the
difference between a "module" and a "program"? What if something is both?
Abigail
--
echo "==== ======= ==== ======"|perl -pes/=/J/|perl -pes/==/us/|perl -pes/=/t/\
|perl -pes/=/A/|perl -pes/=/n/|perl -pes/=/o/|perl -pes/==/th/|perl -pes/=/e/\
|perl -pes/=/r/|perl -pes/=/P/|perl -pes/=/e/|perl -pes/==/rl/|perl -pes/=/H/\
|perl -pes/=/a/|perl -pes/=/c/|perl -pes/=/k/|perl -pes/==/er/|perl -pes/=/./;
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: Sun, 22 Aug 1999 09:16:46 -0700
From: mbudash@sonic.net (Michael Budash)
Subject: Re: Calculating days, hrs, mins between 2 datestamps ...
Message-Id: <mbudash-2208990916460001@adsl-216-103-91-123.dsl.snfc21.pacbell.net>
In article <19990822110812.13887.00002282@ng-cq1.aol.com>,
theeadsnet@aol.com (TheEadsNet) wrote:
>Does anyone know of a routine that will calculate the number of days, hours,
>and minutes between two datestamps that consist of:
>
>mm/dd/yyyy-hh:mm
>
>If possible, not a Perl module, since my ISP won't allow me to install modules
>on my server.
>
>Much thanks.
>
>Joe Halbrook
not sure, but you might try Date::Manip, available at CPAN
hth-
--
| Michael Budash Consulting | 707-252-7670 voice |
| Perl, Javascript, PHP, MySQL | 603-250-8679 fax |
| Official Extropia Developer | mbudash@sonic.net |
------------------------------
Date: 22 Aug 1999 19:37:02 +0200
From: jacklam@math.uio.no (Peter J. Acklam)
Subject: Re: determining a leap year
Message-Id: <wk1zcvu37l.fsf@math.uio.no>
K C Owens <owensk@cadvision.com> wrote:
>
> A year divisible by 4 is a leap year unless it is divisible by 400.
> 2000 is a leap year but 2100 is not.
Sami Rosenblad wrote in message ...
>
> Uhh, wrong. A year is a leap year if...
>
> - it is divisible by 4
> - and not divisible by 100
> - or it is divisible by 400
>
> Therefore, year 2000 is a leap year and 2100 is not, but for different
> reasons than stated above.
"K C Owens" <owensk@cadvision.com> writes:
>
> Sorry about the wrong answer--Sami's is correct.
This should be correct
$is_leap_year = ! ( $year % 4 ) && ( $year % 100 ) || ! ( $year % 400 );
$is_not_leap_year = ( $year % 4 ) || ! ( $year % 100 ) && ( $year % 400 );
$is_leap_year = ( not $year % 4 and $year % 100 or not $year % 400 );
$is_not_leap_year = ( $year % 4 or not $year % 100 and $year % 400 );
Peter
--
Peter J. Acklam - jacklam@math.uio.no - http://www.math.uio.no/~jacklam
------------------------------
Date: Sun, 22 Aug 1999 15:09:24 GMT
From: Teacher Guy <habfan2@my-deja.com>
Subject: File permissions and Errors
Message-Id: <7pp3r0$cl1$1@nnrp1.deja.com>
Hello! I'm stuck. I have a Perl CGI script that prompts user for
password and login. It will use login to create a unique text file,
and if it's a new user will write data to file. The script appears to
work fine. The input data is written to file but the script fails. I
have an error, "Premature end of script headers".
I understand that error in file permissions can cause script to fail.
I went to data directory and attempted to chmod files generated by
script. For example, I have "W00000.txt" in my data directory and when
I tried to chmod file I recieved following message:
"site chmod 666 W00000.txt 550 Change mode failed. Operation not
permitted"
Also, next the text files is a label "Nobody". However, the label next
to other data files that I can chmod is "ftp".
Is there a Perl command that I can use in script to change file
permissions? Here's what I have learned so far:
$fil = "W00000.txt";
chmod 0666, $fil;
OR...................
use FILE::chmod; # not sure what's goin' on here
$File::chmod::MASK = 0;
chmod "+w", "W00000.txt" or die "couldn't chmod +w file: $!";
Here is the code that I'm working with:
#check for existence of lock file
if (-e "lock.fil")
{
#lock file exists! print message and shut down
print &PrintHeader;
print <<"PrintTag";
<html>
<head>
<title>File in use</title>
</head>
<body bgcolor="white" text="black">
<h1>Try again!</h1>
<blockquote>
The database is in use. Please try again later.
</blockquote>
</body>
</html>
PrintTag
exit(0);
}
$mydatadir = "/data1/hypermart.net/dude/datafile/";
$tmpuser = $in{'user'};
$filext = ".txt";
$filogaid = $mydatadir.$tmpuser.$filext;
# use concatenation to build path to user's data file
# chmod 0666,<"/data1/hypermart.net/dude/datafile/*.txt">;
if (-e $fil)
{
#everything is okay. Create lock file.
open (LOCK_FILE2, ">lock.fil");
#open, append record, and close database
open(FILE,">>$fil") || die "Can't find database\n";
# can't have all members write to same scorecard!!
print FILE "$in{'date'}|$in{'score'}\n";
close(FILE);
#close lock file
close(LOCK_FILE2);
#delete lock file
unlink("lock.fil");
}
else
{
open (FILE,">$fil");
chmod 0666, $fil;
print FILE "$in{'date'}|$in{'score'}|\n";
close (FILE);
}
#end of program
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Sun, 22 Aug 1999 14:52:12 GMT
From: "Allan M. Due" <All@n.due.net>
Subject: Re: How to do "or" in IF test?
Message-Id: <w8Uv3.24779$C6.301070@news2.rdc1.on.home.com>
Jimmy Humphrey <jimmy@blackhole-designs.com> wrote in message
:news:37C000F3.D7E6DDBC@blackhole-designs.com...
:Allan,
:Pretty easy,
:$var1 = 20; $var2 = 70;
:print "gimmie some input: ";
:$input = <STDIN>; chomp($input);
:if ($input <= $var1 || $input >= $var2)
:
: print "You got a match!\n";
:}
:else
: print "No match, error...";
:}
:You always have to compare variables with other information unless you are
:just checking to see if something exist such as if (<STDIN>)
:That should help,
:ps - get rid of the strict and -w, they'll just cause unneeded error
:messages
[snip of my response to the original post]
Is the above a joke? First, the convention is to respond below the quoted
test not above. Two, one does not post HTML to a newsgroup as you did.
Newsgroups are a text medium. Third, I didn't post the question, I posted a
response. If you were trying to answer the original question you should
respond to that post not to mine. If you thought I was asking the question
you need to pay closer attention. Third, the advice to not use -w and use
strict to avoid "uneeded error messages" is so wrong-headed as to make
anything else you say very suspect.
--
$email{'Allan M. Due'} = ' All@n.Due.net ';
--Random Quote--
People get annoyed when you try to debug them.
Larry Wall
------------------------------
Date: Sun, 22 Aug 1999 14:27:17 GMT
From: snowhare@long-lake.nihongo.org (Benjamin Franz)
Subject: Re: Maintaining User Sessions without Cookies
Message-Id: <9NTv3.758$Or1.79450@typhoon01.swbell.net>
In article <37BFFDB1.8DDB4F@bigpond.net.au>,
Shori Pty Ltd - Barry W Anderson <bwa@shori.com> wrote:
>
>Benjamin Franz wrote:
>>
>> In article <37bdc6b1@news1.us.ibm.net>, SH <purchase9@hotmail.com> wrote:
>> >they close their browser (without any client side involvement)? Basically a
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[...]
>> With the restriction postulated (no client side involvement),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>> no - there is no way to achieve state persistence after they exit
>> their browser.
>Beg to differ. Log them in. Use a database to track their state.
^^^^^^^^^^^^
Notice the problem? They asked how to _transparently_ track users
between browser sessions *without* involving the client.
Cookies, Basic Auth or CGI form logins *ALL* require client side
involvement. And it simply can't be done without using at least one
of them.
So _with the restriction postulated_, the answer remains: 'No'.
--
Benjamin Franz
------------------------------
Date: 22 Aug 1999 11:06:26 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Maintaining User Sessions without Cookies
Message-Id: <slrn7s081p.jkg.abigail@alexandra.delanet.com>
Shori Pty Ltd - Barry W Anderson (shori_pl@bigpond.net.au) wrote on
MMCLXXXII September MCMXCIII in <URL:news:37BFFDB1.8DDB4F@bigpond.net.au>:
[] Beg to differ. Log them in. Use a database to track their state.
HTTP is a stateless protocol. By nature. By design. That's a feature.
Any attempt to treat that as a statefull protocol will bite you in
the long run. Probably on a most inconvenient time.
You want state? Use a protocol that keeps state. Telnet for instance.
Or FTP. Or IRC. Not HTTP.
Abigail
--
sub camel (^#87=i@J&&&#]u'^^s]#'#={123{#}7890t[0.9]9@+*`"'***}A&&&}n2o}00}t324i;
h[{e **###{r{+P={**{e^^^#'#i@{r'^=^{l+{#}H***i[0.9]&@a5`"':&^;&^,*&^$43##@@####;
c}^^^&&&k}&&&}#=e*****[]}'r####'`=437*{#};::'1[0.9]2@43`"'*#==[[.{{],,,1278@#@);
print+((($llama=prototype'camel')=~y|+{#}$=^*&[0-9]i@:;`"',.| |d)&&$llama."\n");
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: Sun, 22 Aug 1999 20:22:57 +0200
From: office <office@tag.co.il>
Subject: make it find hebrew
Message-Id: <37C04001.4245BA6F@tag.co.il>
This is a multi-part message in MIME format.
--------------0F7477537B027F9B22D50A12
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Hi
Can anyone help me, i am trying to make a search script
that will find and display hebrew, the script looks in a *.dat file and
retrieves the English words letters and words but ignoring
Hebrew.
I understand that it got something to do with 7bit
here is the code segment that i think causing the problem:
# Get Form Information
$value =~ tr/+/ /;
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$FORM{$name} = $value;
}
# Bad Search String Message
$matches = $FORM{'start'};
$total = $FORM{'total'};
$keyword = $FORM{'keyword'};
}
elsif ($method eq "GET") {
read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
if (length($buffer) < 5) {
$buffer = $ENV{QUERY_STRING};
}
@pairs = split(/&/, $buffer);
foreach $pair (@pairs) {
($name, $value) = split(/=/, $pair);
$value =~ tr/+/ /;
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$FORM{$name} = $value;
}
$keyword = $FORM{'keyword'};
$matches = $FORM{'start'};
$total = $FORM{'total'};
}
if ($keyword eq "" | $keyword =~ /^ /)
{
&sresult;
print ("<center>");
if ($keyword eq "")
{
print $ENV{'QUERY_STRING'};
print "<H2>you didnt wrote nothing";
}
else
{
thank for any sugestion
--------------0F7477537B027F9B22D50A12
Content-Type: text/x-vcard; charset=us-ascii;
name="office.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for office
Content-Disposition: attachment;
filename="office.vcf"
begin:vcard
n:Meir Ben David-Webmaster;T@g Advertising
tel;cell:053-742050
tel;fax:972-6-6731373
tel;home:972-6-6734172
tel;work:972-6-6734137
x-mozilla-html:FALSE
url:http://www.tag.co.il
org:Tag Advertising- ISP;Marketing
adr:;;Jerusalem Sreet 709 P.O.Box 3114;Tverya;Israel;14230;Israel
version:2.1
email;internet:office@tag.co.il
title:Web Master
x-mozilla-cpt:;-1
end:vcard
--------------0F7477537B027F9B22D50A12--
------------------------------
Date: 22 Aug 1999 18:03:01 GMT
From: wstsoi@ee.cuhk.hk (TSOI_WING_SHING)
Subject: matching tags in HTML
Message-Id: <7ppe0l$ah4$1@eng-ser1.erg.cuhk.edu.hk>
f there is a HTML file:
<dd>..................................................
<dd>
......................................................
......................................................
<dd>
......................
<dd>
And i write some scripts to change it to:
<dd>................<dd>...........<dd>.......................<dd>
#codes here
open(HTML, "+<tt.html");
undef $/;
$whole_file=<HTML>;
$/="\n";
close(HTML);
$temp=$whole_file;
if ($temp=~/<dd>(.*)<dd>/gsi){
#print"yes";
$1=s/\n//i;
}
it said modification of read-only data.........
how should i do?
how should i take with the filehandle??
thx very much
------------------------------
Date: Sun, 22 Aug 1999 13:38:17 -0400
From: toby <toby@venice.cas.utk.edu>
Subject: Re: new to perl and a bit stupid
Message-Id: <37C03589.5E77B9F2@venice.cas.utk.edu>
>
> > open FILEHANDLE , "filename" || die;
> ^^
> You'll probably want to use an "or", rather then the "||" (logical or)
> there.
>
> <SNIP>
> --
Why? Of course, you could use just:
open(FHAND, "filename") or die "$!";
But it is more readable not necessarily better. Perl's || and && are just
fine in this case and better than C's. You get the last value evaluated,
rather than an enigmatic 0 or 1. If you say that someone would be better
off doing it a different way, give them a reason to evaluate and then
determine if that is their best course of action. Just telling them
"You'll probably want to use an 'or', rather then the '||' (logical or)
there" is short-stroking.
>
> Regards,
> Tim Greer : webmaster@chatbase.com | software@linkworm.com
> The ChatBase: http://www.chatbase.com | 250,000+ hits daily Worldwide!
> TRG Software: http://www.linkworm.com | CGI scripts in Perl/C, & more.
> Unix/NT/Novell Administration, Security, Web Design, ASP, SQL, & more.
> Freelance Programming & Consulting, Musician, Martial Arts, +Sciences.
Toby
------------------------------
Date: 22 Aug 1999 11:08:08 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Perl Email With Netscape
Message-Id: <slrn7s0850.jkg.abigail@alexandra.delanet.com>
Jimmy Humphrey (jimmy@blackhole-designs.com) wrote on MMCLXXXII September
MCMXCIII in <URL:news:37BFF5AF.ADA4EB95@blackhole-designs.com>:
## I was wondering if it is possible to send e-mail in Netscape 4.6 with a
## random quotes using perl 518 (windows perl) acting as the signature
## file.
And your Perl question is?
Abigail
--
perl -wleprint -eqq-@{[ -eqw+ -eJust -eanother -ePerl -eHacker -e+]}-
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: Sun, 22 Aug 1999 18:13:02 GMT
From: Jimmy Humphrey <jimmy@blackhole-designs.com>
Subject: Re: Perl Email With Netscape
Message-Id: <37C03D9D.53012CC1@blackhole-designs.com>
My question was how I could use perl to randomly generate quotes for my netscape
e-mail in the signature file.
Jimmy
Abigail wrote:
> Jimmy Humphrey (jimmy@blackhole-designs.com) wrote on MMCLXXXII September
> MCMXCIII in <URL:news:37BFF5AF.ADA4EB95@blackhole-designs.com>:
> ## I was wondering if it is possible to send e-mail in Netscape 4.6 with a
> ## random quotes using perl 518 (windows perl) acting as the signature
> ## file.
>
> And your Perl question is?
>
> Abigail
> --
> perl -wleprint -eqq-@{[ -eqw+ -eJust -eanother -ePerl -eHacker -e+]}-
>
> -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
> http://www.newsfeeds.com The Largest Usenet Servers in the World!
> ------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: Sun, 22 Aug 1999 11:05:38 -0700
From: Jacque Donahue <cis78.11@shivan.com>
Subject: Re: Request for Comments: www.perl.com
Message-Id: <37C03BF2.579A960D@shivan.com>
I agree with Abigail. We're not just talking Lynx users. At my company, we stress
surfing the internet (as opposed to the intranet) with graphics turned off. This
not only speeds up page loading but saves our company money since we "pay by the
meg".
Just my 2 cents....
Abigail wrote:
> John Stanley (stanley@skyking.OCE.ORST.EDU) wrote on MMCLXXX September
> MCMXCIII in <URL:news:7pjoal$5mo$1@news.NERO.NET>:
> <> In article <Pine.HPP.3.95a.990820141043.20918E-100000@hpplus03.cern.ch>,
> <> Alan J. Flavell <flavell@mail.cern.ch> wrote:
> <> >What the heck do you think you mean, "sites designed specifically with
> <> >lynx in mind". If a site is designed _for_ the WWW, then Lynx is not
> <> >excluded.
> <>
> <> That is not true. There is a big difference between designing a hot web
> <> site and doing it with text browsers in mind. The number of sites
> <> that do nothing at all without having javascript in yor browser are
> <> growing every day, and forgetting to have ALT text for images is common.
> <> So is the use of an imagemap as the only navigation method.
>
> And your point is? Just because there are so many ignorant and incompetent
> "web designers" out there doesn't mean that "designing for the WWW"
> excludes text and speech browsers. Any site that requires you to use a
> browser that displays images and/or does javascript isn't a WWW site;
> no matter how many times you say so. It's an LW (limited web) site.
>
> Abigail
> --
> Anyone who slaps a "this page is best viewed with Browser X" label
> on a Web page appears to be yearning for the bad old days, before the
> Web, when you had very little chance of reading a document written on
> another computer, another word processor, or another network.
> [Tim Berners-Lee in Technology Review, July 1996]
>
> -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
> http://www.newsfeeds.com The Largest Usenet Servers in the World!
> ------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: Sun, 22 Aug 1999 09:12:37 -0500
From: Andrew Sterling Hanenkamp <hanenkamp@networksplus.net>
Subject: Re: Substitute
Message-Id: <37C00554.B0DB4CCB@networksplus.net>
If the line is in $_ then:
s/ +/,/g; # convert space into ','
@num = split /,/;
Or if line is variable $val
$val =~ s/ +/,/g;
@num = split /,/, $val;
FYI, s/a/b/ will substitute regular expression a with regular expression b.
and the 'g' option on the end tells it to replace all matches instead of just
the first. The split function returns a list containing the values split apart
by the given regular expression.
Darren wrote:
> Hi
>
> Heres what I need to be able to do ...
>
> I have a line of text like ...
>
> one two three four
>
> I need to remove the spaces, replace them with a , and then call them from a
> variable like $num[0] $num[1].
>
> All help appreciated.
>
> Regards
>
> Darren
------------------------------
Date: Sun, 22 Aug 1999 14:48:51 GMT
From: websites@erols.com (Irwin Feuerstein)
Subject: The logic of curly braces
Message-Id: <37c00d98.137169422@news.erols.com>
These curly braces are confusing to me. Let's go back to the
beginning.
First, is $var the same as ${var}? Is there a rationale for using one
over the other?
On page 41 of Programming Perl, there is "how ${verb}able". Why is it
coded like that? Is "{$verb}able" the same as "${verb}able"? There
must be a difference, yes?
Irwin
------------------------------
Date: 22 Aug 1999 11:10:00 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: The logic of curly braces
Message-Id: <slrn7s088g.jkg.abigail@alexandra.delanet.com>
Irwin Feuerstein (websites@erols.com) wrote on MMCLXXXII September
MCMXCIII in <URL:news:37c00d98.137169422@news.erols.com>:
##
## Is "{$verb}able" the same as "${verb}able"? There
## must be a difference, yes?
Well, what happened when you tried?
Abigail
--
echo "==== ======= ==== ======"|perl -pes/=/J/|perl -pes/==/us/|perl -pes/=/t/\
|perl -pes/=/A/|perl -pes/=/n/|perl -pes/=/o/|perl -pes/==/th/|perl -pes/=/e/\
|perl -pes/=/r/|perl -pes/=/P/|perl -pes/=/e/|perl -pes/==/rl/|perl -pes/=/H/\
|perl -pes/=/a/|perl -pes/=/c/|perl -pes/=/k/|perl -pes/==/er/|perl -pes/=/./;
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: 22 Aug 1999 12:00:13 PST
From: Neil <neil@pacifier.com>
To: abigail@delanet.com, neil@pacifier.com
Subject: Re: vacation doesn't work with domain name. Alternative in Perl?
Message-Id: <37c048bd.0@news.pacifier.com>
> And your Perl question is?
Abigail, I do mention in my Subject line and in the question, that
I'm looking for suggestions regarding an alternative to the vacation
utility in Perl. To ask for a Perl script recommendation is a Perl question.
Neil
------------------------------
Date: 22 Aug 1999 14:04:59 -0400
From: catfood@apk.net (Mark W. Schumann)
Subject: Re: Wacky Programming Tales
Message-Id: <7ppe4b$1h6@junior.apk.net>
In article <7phs0o$17q@dfw-ixnews16.ix.netcom.com>,
Eric Bohlman <ebohlman@netcom.com> wrote:
>Mark W. Schumann (catfood@apk.net) wrote:
>: I've seen
>:
>: #define ARBEGIN {
>: #define AREND }
>:
>: in Clipper (a somewhat C-ish language in this regard) code.
>:
>: Eh?
>
>In Clipper, curly braces are used as anonymous array constructors, so
>those mnemonics are presumably short for "array begin" and "array end."
Yes, I know.
What I don't know is how the heck this guy thought that made the code
more clear!
------------------------------
Date: 1 Jul 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 1 Jul 99)
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.
To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.
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.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq" from
almanac@ruby.oce.orst.edu. The real FAQ, as it appeared last in the
newsgroup, can be retrieved with the request "send perl-users FAQ" from
almanac@ruby.oce.orst.edu. Due to their sizes, neither the Meta-FAQ nor
the FAQ are included in the digest.
The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq" from
almanac@ruby.oce.orst.edu.
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 V9 Issue 615
*************************************