[12486] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 6085 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Jun 22 02:07:25 1999

Date: Mon, 21 Jun 99 23:00:24 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Mon, 21 Jun 1999     Volume: 8 Number: 6085

Today's topics:
    Re: 2 simple (not to me tho) questions (Abigail)
    Re: 2 simple (not to me tho) questions (Abigail)
    Re: 2 simple (not to me tho) questions (Larry Rosler)
    Re: Afraid to ask about Y2K! (Abigail)
    Re: Beginner Perl Question <eng80386@nus.edu.sg>
    Re: Beginner Perl Question (Jon Bell)
    Re: Beginner Perl Question (Howie)
    Re: Beginner Perl Question (Abigail)
        bulk emailing <mrdank@sprintmail.com>
        Does the Agent NG reader use a DB that can be read by P (rogdh)
    Re: Does the Agent NG reader use a DB that can be read  <dgris@moiraine.dimensional.com>
    Re: File modification time question... (William Herrera)
    Re: Formats (Ronald J Kimball)
    Re: function to read a line & return it <tchrist@mox.perl.com>
    Re: Hash or Array (William Herrera)
    Re: how to change a line of text in a file? <JFedor@datacom-css.com>
    Re: HTML Redirection <eng80386@nus.edu.sg>
    Re: Interpreting MS-ASCII - anyone have a filter? (Abigail)
    Re: Is Perl4 Y2K compliant? (twod)
    Re: Is there a way to access the volume label on a CDRW <wyzelli@yahoo.com>
        Need help with #exec cgi <dimensions@dialaccess.com>
        Newbie:VBQ (Very Basic Question) <stannehi@tu.infi.net>
    Re: Piping through Less. <xyf@inetnebr.com>
    Re: Piping through Less. (Ronald J Kimball)
    Re: read files in Perl (Treble Clef)
        Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: 21 Jun 1999 23:18:30 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: 2 simple (not to me tho) questions
Message-Id: <slrn7mu3kd.k1b.abigail@alexandra.delanet.com>

Weborium (weborium@aol.com) wrote on MMCXX September MCMXCIII in
<URL:news:19990621184026.22990.00002857@ng-xa1.aol.com>:
[] 
[] 
[] Two quick questions:
[] 1. How do I remove spaces when printing an array? If @animal=("c","a","t");
[] print "@animal"; #this gets c  a  t.
[] print @animal; #gets the length of the array.

No, it doesn't.

[] print '@animal'; #literally does just that w/o interpolating.
[] I just want to print cat.

print @animal; will do fine.

[] 2. How can I convert a string with both upper-and lower-case letters into all
[] lowercase?
[] $string="America" to $string="america"?
[] I don't know the contents of the variable in question, otherwise I'd just
[] assign the new value. 

Did you look in the documentation for lowercase? Nope? I thought so.

[] I don't have the perl docs, so I can't do the perldoc thing. I'm testing the
[] scripts on a DOS version with only perl.exe.


If you don't have the documentation, you don't have Perl.  If you are
unwilling to get the documentation, don't be so rude to ask your questions
here. It's your own choice to suffer, don't bother this group.



Abigail
-- 
sub _'_{$_'_=~s/$a/$_/}map{$$_=$Z++}Y,a..z,A..X;*{($_::_=sprintf+q=%X==>"$A$Y".
"$b$r$T$u")=~s~0~O~g;map+_::_,U=>T=>L=>$Z;$_::_}=*_;sub _{print+/.*::(.*)/s}
*_'_=*{chr($b*$e)};*__=*{chr(1<<$e)};
_::_(r(e(k(c(a(H(__(l(r(e(P(__(r(e(h(t(o(n(a(__(t(us(J())))))))))))))))))))))))


  -----------== 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: 21 Jun 1999 23:20:22 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: 2 simple (not to me tho) questions
Message-Id: <slrn7mu3nv.k1b.abigail@alexandra.delanet.com>

Bob Walton (walton@frontiernet.net) wrote on MMCXXI September MCMXCIII in
<URL:news:376EF026.56082447@frontiernet.net>:
,, Casey R Tweten wrote:
,, 
,, > ...I agree, in fact, why is that so long?
,, >
,, > my @animal=("c","a","t");
,, > print foreach @animal;
,, 
,, If shorter is better...
,, 
,, my @animal=("c","a","t");
,, print for @animal;


If shorter is better...

   my @animal = ("c", "a", "t");
   print @animal;


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: Mon, 21 Jun 1999 22:45:49 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: 2 simple (not to me tho) questions
Message-Id: <MPG.11d8c2e79dc24618989c14@nntp.hpl.hp.com>

In article <376EF026.56082447@frontiernet.net> on Mon, 21 Jun 1999 
22:08:38 -0400, Bob Walton <walton@frontiernet.net> says...
> Casey R Tweten wrote:
> > ...I agree, in fact, why is that so long?
> >
> > my @animal=("c","a","t");
> > print foreach @animal;
> 
> If shorter is better...
> 
> my @animal=("c","a","t");
> print for @animal;

If shorter is better...

my@animal=qw(c a t);
print@animal;

-- 
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


------------------------------

Date: 21 Jun 1999 23:07:10 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Afraid to ask about Y2K!
Message-Id: <slrn7mu2v6.k1b.abigail@alexandra.delanet.com>

Munson Minnie (revjack@radix.net) wrote on MMCXX September MCMXCIII in
<URL:news:7klusp$qi1$1@news1.Radix.Net>:
!! Abigail explains it all:
!! :Lee (rlb@intrinsix.ca) wrote on MMCXVII September MCMXCIII in
!! :<URL:news:B38FE5FE966887F4F6@0.0.0.0>:
!! :\\ She was gone for a bit (or her posts weren't making their way to my sorry
!! :\\ excuse for a news feed) but she's been posting here regularly this week.
!! 
!! :I was in the hospital for 25 days, hence my lack of postings in the
!! :month of May.
!! 
!! Well? Are you all right now?


Not yet.


Abigail
-- 
perl5.004 -wMMath::BigInt -e'$^V=Math::BigInt->new(qq]$^F$^W783$[$%9889$^F47]
 .qq]$|88768$^W596577669$%$^W5$^F3364$[$^W$^F$|838747$[8889739$%$|$^F673$%$^W]
 .qq]98$^F76777$=56]);$^U=substr($]=>$|=>5)*(q.25..($^W=@^V))=>do{print+chr$^V
%$^U;$^V/=$^U}while$^V!=$^W'


  -----------== 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: Tue, 22 Jun 1999 12:30:06 +0800
From: "cwt" <eng80386@nus.edu.sg>
Subject: Re: Beginner Perl Question
Message-Id: <7kn421$9fm$1@nobel2.pacific.net.sg>

use cron job.
Howie <noone@home.com> wrote in message
news:uLCb3.3848$Lx2.3040@news.rdc1.sdca.home.com...
> Is it possible to execute a script every 2 hours ( I need to delete cached
> files) using Perl or a CGI script? Or would I have to use a complete
different
> language?
> thanks




------------------------------

Date: Tue, 22 Jun 1999 04:46:05 GMT
From: jtbell@presby.edu (Jon Bell)
Subject: Re: Beginner Perl Question
Message-Id: <FDpp8t.MrH@presby.edu>

 Howie <noone@home.com> wrote:
>Is it possible to execute a script every 2 hours ( I need to delete cached 
>files) using Perl or a CGI script? Or would I have to use a complete different 
>language?

Which language you're using is irrelevant here.  What *is* relevant is 
which operating system you're using.  Under Unix or Linux you would use
the 'cron' utility to run something automatically according to a schedule.

-- 
Jon Bell <jtbell@presby.edu>                        Presbyterian College
Dept. of Physics and Computer Science        Clinton, South Carolina USA
        [     Information about newsgroups for beginners:     ]            
        [ http://www.geocities.com/ResearchTriangle/Lab/6882/ ]


------------------------------

Date: Tue, 22 Jun 1999 05:07:49 GMT
From: noone@home.com (Howie)
Subject: Re: Beginner Perl Question
Message-Id: <FSEb3.4044$Lx2.3286@news.rdc1.sdca.home.com>

In article <FDpp8t.MrH@presby.edu>, jtbell@presby.edu (Jon Bell) wrote:
> Howie <noone@home.com> wrote:
>>Is it possible to execute a script every 2 hours ( I need to delete cached 
>>files) using Perl or a CGI script? Or would I have to use a complete different
> 
>>language?
>
>Which language you're using is irrelevant here.  What *is* relevant is 
>which operating system you're using.  Under Unix or Linux you would use
>the 'cron' utility to run something automatically according to a schedule.
>
Yeah, my server runs Unix. Now I know what to look for. Thanks.


------------------------------

Date: 21 Jun 1999 23:34:09 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Beginner Perl Question
Message-Id: <slrn7mu4hq.k1b.abigail@alexandra.delanet.com>

Howie (noone@home.com) wrote on MMCXXI September MCMXCIII in
<URL:news:uLCb3.3848$Lx2.3040@news.rdc1.sdca.home.com>:
// Is it possible to execute a script every 2 hours ( I need to delete cached 
// files) using Perl or a CGI script?


Yes.


I have to admit "every 2 hours" and "CGI script" sounds strange to me.
One would like to run a CGI script on demand, just as water that comes
out of the faucet on demand, and not just every 2 hours.


Abigail
-- 
perl -wle 'print "Prime" if (1 x shift) !~ /^1?$|^(11+?)\1+$/'


  -----------== 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: Tue, 22 Jun 1999 01:19:18 -0400
From: "Dani Koesterich" <mrdank@sprintmail.com>
Subject: bulk emailing
Message-Id: <7kn68q$kn6$1@holly.prod.itd.earthlink.net>

Hello.

I created a script that takes an email database file, and a message file and
sends the message to each person in the email database file.  I have over
10,000 emails in my database and growing (it is a newsletter) and it gave me
an error after email #950 so I figured it was because I wasn't letting my
server rest, so I made the script pause for 3 minutes every 200 emails and
started from email #951.  It did 200 emails and paused for 3 minutes, then
gave me an error after email #237 and a friend of mine suggested that it was
because the email address in use had an invalid host or something.... I have
attached the script to the end of this message, and if anyone could tell me
how to make sure the email address works before sending out the mail, I
would be very appreciative.  Thank You.

#!/usr/local/bin/perl -w

require "cgi-lib.pl";
&ReadParse;

&Display_Admin if ($in{'admin'} eq '1');

&No_Access if (!($in{'password'}));
&No_Access if (!($in{'database'}));
&No_Access if (!($in{'subject'}));
&No_Access if (!($in{'from'}));
&No_Access if (!($in{'message'}));
&No_Access if (!(&Check_Password));
&No_Database if (!(-e "$in{'database'}"));
&No_Message if (!(-e "$in{'message'}"));

#Set Variables
$pw = $in{'password'};
$database = $in{'database'};
$subject = $in{'subject'};
$from = $in{'from'};
$message = $in{'message'};
$mailprog = '/usr/sbin/sendmail';

print "Content-type: text/html\n\n";
open(DATABASE, $database);
@Addresses = <DATABASE>;
close(DATABASE);
$count = 0;

foreach $address(@Addresses){
 chomp $address;
 &Send_It_Out;
 $count++;
}
print <<HTML;
<html>
<head>
<title>Successful</title>
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p align="center"><Font face="Arial" size="4" color="#FF0000"><B>Mailout
Successful!</B></Font></p><BR>
<font face="Arial" size="3">Your $message has been sent to $count
people!</font>
</body>
</html>
HTML
exit;

sub No_Access{
 print "Content-type: text/html\n\n";
 print <<NoAccess;
<html>
<head>
<title>No Access</title>
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p align="center"><Font face="Arial" size="4" color="#FF0000"><B>You do not
have access to this file</b></font></p>
</body>
</html>
NoAccess
exit;
}

sub No_Database{
 print "Content-type: text/html\n\n";
 print <<NoDatabase;
<html>
<head>
<title>No Database Found!</title>
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p align="center"><Font face="Arial" size="4" color="#FF0000"><B>No Database
Found!</B></Font></p>
<BR><Font face="Arial" size="3" color="#000000">The file $database has not
been found.  Make sure it is in the same directory as this script.</font>
</body>
</html>
NoDatabase
exit;
}

sub No_Message{
 print "Content-type: text/html\n\n";
 print <<NoMessage;
<html>
<head>
<title>No Message Found!</title>
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p align="center"><Font face="Arial" size="4" color="#FF0000"><B>No Message
Found!</B></Font></p>
<BR><Font face="Arial" size="3" color="#000000">The file $message has not
been found.  Make sure it is in the same directory as this script.</font>
</body>
</html>
NoMessage
exit;
}

sub Check_Password{
 return '1' if ((lc $in{'password'}) eq 'avigayil');
}

sub Send_It_Out{
 if ($count eq '200'){
  sleep 180;
  $count = '1';
 }
 open(MAIL,"|$mailprog -t");
 print MAIL "To: $address\n";
 print MAIL "From: $from\n";
 print MAIL "Subject: $subject\n\n";
 open (MESSAGE, $message);
 while ($line = <MESSAGE>){
  print MAIL "$line";
 }
 close (MESSAGE);
 close (MAIL);
 open(YEAH, ">yeah.txt");
 print YEAH "$count";
 close (YEAH);
 $highload = ".4";
 while (($currload = &Load) > $highload) {
  sleep 15;
 }
}

sub Display_Admin{
print "Content-type: text/html\n\n";
print <<Admin;
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Send Out Bulk E-Mail</title>
</head>

<body bgcolor="#FFFFFF" text="#000000">

<p align="center"><font color="#FF0000" face="Arial" size="4"><b>Send Out
Bulk E-Mail</b></font></p>

<form method="post">
  <div align="center"><center><table border="0" cellpadding="2" width="80%">
    <tr>
      <td width="56%" align="left" valign="top"><font face="Verdana"
size="2" color="#0000FF"><b>E-Mail
      Database Filename:</b></font><br>
      <font face="Verdana" size="2" color="#000000"><small>Note: must be in
same directory as
      this script and must be in following format:<br>
      Email1\@Host1.com<br>
      Email2\@Host2.com<br>
      etc.</small></font></td>
      <td width="44%" align="left" valign="top"><input type="text"
name="database"
      value="database.lst" size="30"></td>
    </tr>
    <tr>
      <td width="56%" align="left" valign="top"><font face="Verdana"
size="2" color="#0000FF"><b>From:</b></font><br>
      <font face="Verdana" size="2" color="#000000"><small>Note: if you want
your name
      displayed, use:<br>
      &quot;Name Name&quot; &lt;email\@host.com&gt;</small></font></td>
      <td width="44%" align="left" valign="top"><input type="text"
name="from"
      value="&quot;Name Name&quot; &lt;email\@host.com&gt;" size="30"></td>
    </tr>
    <tr>
      <td width="56%" align="left" valign="top"><font face="Verdana"
size="2" color="#0000FF"><b>Subject:</b></font></td>
      <td width="44%" align="left" valign="top"><input type="text"
name="subject" size="30"></td>
    </tr>
    <tr>
      <td width="56%" align="left" valign="top"><font face="Verdana"
size="2" color="#0000FF"><b>Ascii
      Message File</b></font><br>
      <font face="Verdana" size="2" color="#000000"><small>Note: file must
be in same directory
      as this script.</small></font></td>
      <td width="44%" align="left" valign="top"><input type="text"
name="message"
      value="message.txt" size="30"></td>
    </tr>
    <tr>
      <td width="56%" align="left" valign="top"><font face="Verdana"
size="2" color="#0000FF"><b>Password:</b></font></td>
      <td width="44%" align="left" valign="top"><input type="password"
name="password" size="30"></td>
    </tr>
    <tr>
      <td width="100%" colspan="2" align="center" valign="top"><input
type="submit"
      value="Send Out Mail"></td>
    </tr>
  </table>
  </center></div>
</form>
</body>
</html>
Admin
exit;
}

sub Load {
    # Test system load and wait if it's too high
    @uptime = split(/,/, `uptime`);
    $fraction = $uptime[3];
    $load = (split /:/, $fraction)[1];
    return $load;
}






------------------------------

Date: Tue, 22 Jun 1999 05:02:02 GMT
From: rogdh@iname.com (rogdh)
Subject: Does the Agent NG reader use a DB that can be read by Perl?
Message-Id: <37700450.6371051@news.mindspring.com>




------------------------------

Date: 22 Jun 1999 00:02:30 -0600
From: Daniel Grisinger <dgris@moiraine.dimensional.com>
Subject: Re: Does the Agent NG reader use a DB that can be read by Perl?
Message-Id: <m3bte8kc21.fsf@moiraine.dimensional.com>

rogdh@iname.com (rogdh) writes:

>

purple.

dgris
-- 
Daniel Grisinger          dgris@moiraine.dimensional.com
perl -Mre=eval -e'$_=shift;;@[=split//;;$,=qq;\n;;;print 
m;(.{$-}(?{$-++}));,q;;while$-<=@[;;' 'Just Another Perl Hacker'


------------------------------

Date: Tue, 22 Jun 1999 05:22:11 GMT
From: posting.account@lynxview.com (William Herrera)
Subject: Re: File modification time question...
Message-Id: <376f1b56.57974323@news.rmi.net>

On Mon, 21 Jun 1999 23:07:49 GMT, portboy@home.com (Mitch) wrote:

>sub loop {
>        while (1)
>        {
>                &foo;
>                if ($delta == 1) {  # delta is a flag set by any
>#subroutine that modifies the configuration file 1=> change, 0 = no
>#change.


Maybe there should be two processes:

1. A process that checks to see whether any file you need to know
about is modified or not and then writes a (variable) prompt to the
screen depending on what is happening. This maybe should sleep() just
a second or two, depending on the resource cost of the polling.

2. A process that takes the user input and processes it, but does not
write the prompt.

You may want to do some kind of semaphore system or flock call to
avoid collisions over console writes.


---
The above from: address is spamblocked. Use wherrera (at) lynxview (dot) com for the reply address.


------------------------------

Date: Tue, 22 Jun 1999 01:10:26 -0400
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: Formats
Message-Id: <1dtrymq.ivddn11lr4ex3N@p57.tc2.metro.ma.tiac.com>

<bernd1615@my-deja.com> wrote:

> open ( LOG, "$FileName" ) || die "can`t open $FileName : $!" ;
> open (OLG, "$OutputFile" ) || die "$!" ;

> write  OLG;

> format STDOUT =
> # format is defined ...

Why are you defining a format for STDOUT if you are writing to OLG?

(Bad choice of filehandles, by the way - LOG and OLG?  You're just
asking for typos.)

-- 
 _ / '  _      /       - aka -
( /)//)//)(//)/(   Ronald J Kimball      rjk@linguist.dartmouth.edu
    /                                http://www.tiac.net/users/chipmunk/
        "It's funny 'cause it's true ... and vice versa."


------------------------------

Date: 21 Jun 1999 22:06:41 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: function to read a line & return it
Message-Id: <376f0bd1@cs.colorado.edu>

     [courtesy cc of this posting mailed to cited author]

In comp.lang.perl.misc, 
    "John A. Grant" <zjagrantz@znrcanz.gcz.ca> writes:
:    The "--" isn't in my .sig file - the newsreader adds "--", so
:    I don't have the choice.

Then fix your newsreader!  Sheesh.  Or have the author fix it.
It's got to be the most trivial of fixes.  What ever happened
to the Good Netkeeping Seal of Approval?

--tom
-- 
    "We have ways to make you scream." 
	--Intel advertisement, in the June 1989 Doctor Dobbs Journal


------------------------------

Date: Tue, 22 Jun 1999 05:45:16 GMT
From: posting.account@lynxview.com (William Herrera)
Subject: Re: Hash or Array
Message-Id: <376f2254.59764797@news.rmi.net>

On Mon, 21 Jun 1999 17:46:15 -0500, Michael Hill
<l463520@lmtas.lmco.com> wrote:

>How come this doesn't work?
>
>%myarr = ("parta","partb","1",
>"parta","partc","2",
>"partx","partd","3",);
>while (($assy, $comp, $qty) = each(%myarr))
>     {
>     print "$assy, $comp, $qty\n";
>     }
>
>I think that the "each" function puts the input into pairs 
Yes.
> and I want three records with three fields.

Look up splice() and push() in the perlfunc documentation, and use
@myarr, not %myarr. Hashes will scramble triplets into re-ordered
pairs.




---
The above from: address is spamblocked. Use wherrera (at) lynxview (dot) com for the reply address.


------------------------------

Date: Tue, 22 Jun 1999 01:47:00 -0400
From: "Jody Fedor" <JFedor@datacom-css.com>
Subject: Re: how to change a line of text in a file?
Message-Id: <7kn67f$ka2$1@plonk.apk.net>


Tom Christiansen wrote in message <376ec28e@cs.colorado.edu>...

>The only two "links" are to DB_File and to perlrun.  A "link" just means
>a different manpage.  If you can't type
>
>    % man perlrun
>or
>    % man DB_File


Tom, are these available on the web?  I'm using Active States' Active Perl
with all documentation loades but searches come up empty on DB_File.  Any
help here?

Jody




------------------------------

Date: Tue, 22 Jun 1999 12:31:57 +0800
From: "cwt" <eng80386@nus.edu.sg>
Subject: Re: HTML Redirection
Message-Id: <7kn45g$9hi$1@nobel2.pacific.net.sg>

use print "Location : $URL_PATH";

<bandhunt@my-deja.com> wrote in message news:7kmlbp$q06$1@nnrp1.deja.com...
> I was hoping someone could tell me how to
> redirect HTML using Perl/CGI.
>
> I have a search script for my website and instead
> of displaying a list of matches using
> Content-type: text/html\n\n" to print out the
> HTML output, I want the script to take the user
> directly to a specific URL based on the search
> query.
>
> Any help would be great.
> Thanks,
>    Donn
>    email: bloodlet19@hotmail.com
>
>
> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.




------------------------------

Date: 21 Jun 1999 23:11:59 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Interpreting MS-ASCII - anyone have a filter?
Message-Id: <slrn7mu387.k1b.abigail@alexandra.delanet.com>

Bart Lateur (bart.lateur@skynet.be) wrote on MMCXX September MCMXCIII in
<URL:news:376f8376.2118896@news.skynet.be>:
() Alan J. Flavell wrote:
() 
() >MS have a
() >tendency to refer to their 8-bit codings as "ANSI", but I've never found
() >anything from the ANSI that justifies this usage, either.
() 
() But yes. Windows uses a superset of ISO-Latin-1, AKA "Ansi", which is
() the same as most Unices use.


Which Unix uses the same set as Windows?  All Unices I know use ISO-Latin-x
(or Unicode) for some x.



Abigail
-- 
srand 123456;$-=rand$_--=>@[[$-,$_]=@[[$_,$-]for(reverse+1..(@[=split
//=>"IGrACVGQ\x02GJCWVhP\x02PL\x02jNMP"));print+(map{$_^q^"^}@[),"\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: Tue, 22 Jun 1999 05:48:55 GMT
From: twod@home.invalid (twod)
Subject: Re: Is Perl4 Y2K compliant?
Message-Id: <btFb3.14409$NY6.5449@news.rdc1.sfba.home.com>

: > When was your PERL4 binary built ?
: 
: Oh boy, probably at LEAST 3 or 4 years ago... but considering how long perl5
: been out, I'd say longer.
: 
: > Using what version of the OS ?
: > Are they all Y2K compliant ?
: 
: Been on that long upgrade process (*ugh* my boss left all the Y2K upgrades
: to me)...

You know, this might just be a good time to upgrade to PERL5 seeing as you 
have to retest all that PERL4 code anyway, especially if the underlying OS 
and/or libraries are changing ...


Naturally, PERL5 has the same claims to Y2K readiness as PERL4 :)

Have fun.

IAP
-- 
I am using anti-spam measures please replace 'home.invalid' with 'home.com'


------------------------------

Date: Tue, 22 Jun 1999 14:20:44 +0930
From: "Wyzelli" <wyzelli@yahoo.com>
Subject: Re: Is there a way to access the volume label on a CDRW?
Message-Id: <wCEb3.9$x9.728@vic.nntp.telstra.net>

rogdh <rogdh@iname.com> wrote in message
news:376f034c.6111658@news.mindspring.com...
> I have a CDRW that I use for backup.
>
> Sometimes, I forget to switch music CDs with my backup CDRWs
> at the end of the evening.
>
> I'd like to test the volume label of the CDRW for a string to see if
> the correct CDRW is in the drive.
>
> Is there a way....
>
>
> thank you
>
> roger

Well obvoiusly you have the shebang wrong..

It should be #!usr/bin/perl -w

Wyzelli

(reply to ID=10T)




------------------------------

Date: Mon, 21 Jun 1999 23:31:04 -0500
From: "Dimensions" <dimensions@dialaccess.com>
Subject: Need help with #exec cgi
Message-Id: <ChEb3.453$M46.3440@newsfeed.slurp.net>

I am running a  "exec cgi" (SSI) as:

<!--#exec cgi="/cgi-bin/myscript.cgi"-->

I have not being able to get it to work with parameters such as:

<!--#exec cgi="/cgi-bin/myscript.cgi?mydata1"-->
<!--#exec cgi="/cgi-bin/myscript.cgi?mydata2"-->
etc...

Can this type of script take them? What am I missing?





------------------------------

Date: Tue, 22 Jun 1999 00:32:08 -0400
From: "Stuart, Xinlu and Niuniu" <stannehi@tu.infi.net>
Subject: Newbie:VBQ (Very Basic Question)
Message-Id: <376F11C8.9F7F0DED@tu.infi.net>

I just purchased a book "Perl 5 By Example" that came with perl5 on a
cd. I installed it, it appears to be working. I typed   print("blah blah
blah ,\n");      in notepad and named it test.pl
Tried to run it and nothing happened. I know this is beyond basic but I
would appreciate any help I could get. I am doing all of this in the
windows98 environment (if that even matters)

-Stuart



------------------------------

Date: Mon, 21 Jun 1999 23:39:40 -0500
From: ktb <xyf@inetnebr.com>
Subject: Re: Piping through Less.
Message-Id: <376F138C.4D6FA6D1@inetnebr.com>

Rick Delaney wrote:
> 
> [posted & mailed]
> 
> ktb wrote:
> >
> > I have the following script which works fine but I can't figure out how
> > to pipe the output from the program to 'less' on my Linux system so I
> > can view all the output.
> 
> What's wrong with actually piping to less?
> 
> $ perl yourprog | less

If I pipe it through less at the command line I can't enter the sting I
want to search for.  The program can't run.

> 
> If you want to do it from inside your program then just open a pipe to
> less:
> 
> open STDOUT, '|less' or die "Can't fork: $!\n";
> # print whatever here
> close STDOUT;

Ok I tried that:

___________________________

<snip top of program>

    while (<SFILE>) {
    @parts = split(/\//);

    if ($PartsFile = $parts[4]) {
        
       

open STDOUT, '|less' or die "Can't fork: $!\n";
print "$PartsFile\n";  # print whatever here
close STDOUT;
      }

  }
_____________________________

This results in only one line being piped into 'less.'  If I take the
"close STDOUT" out all the lines containing the search string get piped
in but when I try to quit less then all the lines keep looping through
and I can't exit properly.  Any more ideas?  Thanks for the info below. 
I will look at it later.  Red eyes are setting in:)
Thanks,
kent

 
> perldoc -f open
> 
> Don't forget the close() or your program might exit and close before you
> have a chance to page through the output.
> 
> --
> Rick Delaney
> rick.delaney@home.com


------------------------------

Date: Tue, 22 Jun 1999 01:10:29 -0400
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: Piping through Less.
Message-Id: <1dtrzru.p89uxo2a5xqlN@p57.tc2.metro.ma.tiac.com>

ktb <xyf@inetnebr.com> wrote:

> I have the following script which works fine but I can't figure out how
> to pipe the output from the program to 'less' on my Linux system so I
> can view all the output.

open(OUTPUT, "| less") or die "pipe error: $!\n";

print OUTPUT "Hello world!\n";  # <-- your output goes here

close(OUTPUT) or die "pipe error: $!\n";


Read about open() in the perlfunc documentation for more info.

-- 
 _ / '  _      /       - aka -
( /)//)//)(//)/(   Ronald J Kimball      rjk@linguist.dartmouth.edu
    /                                http://www.tiac.net/users/chipmunk/
        "It's funny 'cause it's true ... and vice versa."


------------------------------

Date: Tue, 22 Jun 1999 04:56:16 GMT
From: NOSPAMtrebleclef@earthling.net (Treble Clef)
Subject: Re: read files in Perl
Message-Id: <376f1693.81642062@news.ozemail.com.au>

I have tried in vain to get this working, but I
keep getting 

 28: Syntax error: "(" unexpected  

i would appreciate assistance with this, as i am a
perl newbie

thanks in advance
TC



On Sat, 08 May 1999 08:08:05 -0700, Nate
<no@onehere.not> wrote:

:Roberto wrote:
:> 
:> Hi,
:> how can I read a file from another url using Perl script?
:> Thank you very much
:> 
:> 
:> -------------------------------------------
:>   roberto azzimonti
:>   mailto:roberto@mysacramento.com
:>   http://www.mysacramento.com/azzimonti
:> -------------------------------------------
:
:From my site....
:
:#!/usr/local/bin/perl
:
:## get_web_test.pl
:
:###########################################################
:# Gets any web page's source and sends the HTML to the
:# browser, the output could have been stored in a file
:# at your site, or directed to further code that
:# parses the output and makes a web page based on the
:# information downloaded. This is the start of some
:# really cool scripts, the possibilities are endless!
:#
:# For more examples and free sources, visit www.nocrash.com
:###########################################################
:
:use IO::Socket;
:
:#print "Content-Type: text/html\n\n";
: 
:print "\n-BEGIN-\n";
:
:    $host = "www.nasa.gov";  ## in this example we get
:'www.nasa.gov/index.html'
:    $document = "/index.html";
:    $EOL = "\015\012";
:    $BLANK = $EOL x 2;
:
:        $remote = IO::Socket::INET->new( Proto     => "tcp",
:                                         PeerAddr  => $host,
:                                         PeerPort  => "http(80)",
:                                        );
:        unless ($remote) { die "cannot connect to http daemon on $host"
:}
:        $remote->autoflush(1);
:        print $remote "GET $document HTTP/1.0" . $BLANK;
:
:## we don't have to print here, you now have the page's source, do with
:it what you want!
:
:        while ( <$remote> ) { print }
:        close $remote;
:
:print "\n-END-\n";
:
:***************************************************************
:Computer Problems? Free on-line solutions to your problems at:
:http://www.nocrash.com/      * Database of solutions, free!
:Drivers, DLL's, Programs, Free CGI Scripts, Programmer's Area
:***************************************************************



------------------------------

Date: 12 Dec 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Special: Digest Administrivia (Last modified: 12 Dec 98)
Message-Id: <null>


Administrivia:

Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing. 

]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body.  Majordomo will then send you instructions on how to confirm your
]subscription.  This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.

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". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". 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". It appears twice
weekly in the group, but is not distributed in the digest.

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 V8 Issue 6085
**************************************

home help back first fref pref prev next nref lref last post