[10074] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3667 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Sep 9 08:07:56 1998

Date: Wed, 9 Sep 98 05:00:32 -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           Wed, 9 Sep 1998     Volume: 8 Number: 3667

Today's topics:
    Re: Any example parallel fetching code for LWPng? (Maurice Aubrey)
        Can anyone tell me how to include the location of my ap (Kevin Carlson)
    Re: Can anyone tell me how to include the location of m dave@mag-sol.com
        code value (like QUERY_STRING) dwiesel@my-dejanews.com
    Re: code value (like QUERY_STRING) <Tony.Curtis+usenet@vcpc.univie.ac.at>
        FileHandle.pm <sneaker@sneex.fccj.org>
    Re: FileHandle.pm <rra@stanford.edu>
    Re: IO::File Permissions - Enlightened! <sneaker@sneex.fccj.org>
        IRR Function needed <bubblesplit@pc.vom>
        Looking for a programm in Perl!:=) <plateforme@wanadoo.fr>
    Re: merge arrays and strings (Lack Mr G M)
        Need help for locking files pprongue@marvel.ch
    Re: Need help for locking files <zenin@bawdycaste.org>
    Re: Off topic, but ... [Was Re: Perl & Java - differenc <sneaker@sneex.fccj.org>
    Re: Perl Programmer Needed (Roberto)
    Re: Perl Programmer Needed <zenin@bawdycaste.org>
    Re: Problems with UNC on Windows platforms greenej@my-dejanews.com
    Re: Problems with UNC on Windows platforms (Jeffrey R. Drumm)
        regexp teaser newsgrp@business-heaven.com
    Re: Why Perl ? <jerryp.usenet@connected.demon.co.uk>
        Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)

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

Date: Wed, 09 Sep 1998 09:46:20 GMT
From: maurice@hevanet.com (Maurice Aubrey)
Subject: Re: Any example parallel fetching code for LWPng?
Message-Id: <slrn6vcjj9.2l5.maurice@we-24-130-48-83.we.mediaone.net>

On Wed, 09 Sep 1998 06:06:18 GMT, hup@my-dejanews.com <hup@my-dejanews.com> 
wrote:

>  I know the code above are dirty, but, hopefully it still clean enough to
>make you understand. I know it could be done easily by using LWPng,
>unfortunately, I don't be able to find any example after read the man pages,
>Yahoo! and AltaVista searching.

A nice example can be found at:

	http://www.stonehenge.com/merlyn/WebTechniques/col27.html

-- 
Maurice Aubrey <maurice@hevanet.com>

We must not forget that the wheel is reinvented so often because it is
a very good idea; I've learned to worry more about the soundness of
ideas that were invented only once.
  - David Lorge Parnas, Computer, 1996 


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

Date: Wed, 09 Sep 1998 07:53:40 GMT
From: klc400@mail.usask.ca (Kevin Carlson)
Subject: Can anyone tell me how to include the location of my applet in perl?
Message-Id: <6t5cbq$o0f$1@tribune.usask.ca>

Hi.  I've just written this script and it's having problems finding my applet. 
Can anyone please explain to me how to escape characters because I think this 
is my problem?  Thanks!  Kevin.

#!/usr/bin/perl
$counterfile = 'Counter.txt';

open (Counter, "$counterfile");
$Count = <Counter>;
close(Counter);
++$Count;
$rd = "";
$rr = "";
print "Content-type: text/html\n\n";
print "<applet 
code=http://free.prohosting.com/~klc400/WelcomeBanner/Welcome.class width=395 
height=50>";
print "<param name=AppBGImage value=black.gif>";
print "<param name=AppTile value=true>";
print "<param name=DelayBetweenChars value=40>";
print "<param name=DelayBetweenRuns value=5000>";
print "<param name=Font value=TimesRoman>";
print "<param name=HorizCenter value=true>";
print "<param name=Pointsize value=20>";
print "<param name=Style value=bold>";
print "<param name=text1 value=Greetings()>";
print "<param name=text2 value=\"Welcome to My Site\">";
print "<param name=text3 value=\"You are visitor #";

@nums = split(//, $Count);
foreach $num (@nums) {
        print $num;
        }
print " since September 9/98.\">";

print "<param name=TextCount value=3>";
print "<param name=VertCenter value=true>";
print "</applet>";

open (Counter, ">$counterfile");
print Counter $Count;
close (Counter);



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

Date: Wed, 09 Sep 1998 11:14:08 GMT
From: dave@mag-sol.com
Subject: Re: Can anyone tell me how to include the location of my applet in perl?
Message-Id: <6t5nu0$pj8$1@nnrp1.dejanews.com>

Kevin,

In article <6t5cbq$o0f$1@tribune.usask.ca>,
  klc400@mail.usask.ca (Kevin Carlson) wrote:
> Hi.  I've just written this script and it's having problems finding my applet.
> Can anyone please explain to me how to escape characters because I think this
> is my problem?  Thanks!  Kevin.
>
> #!/usr/bin/perl
> $counterfile = 'Counter.txt';
>

# You should probably check the results of the file open and act
appropriately. # You should probably use the normal standard of giving file
handles upper- # case names.

> open (Counter, "$counterfile");
> $Count = <Counter>;
> close(Counter);
> ++$Count;
> $rd = "";
> $rr = "";

# You should probably use a here document rather than all these
# ugly print statements.

> print "Content-type: text/html\n\n";

# You should probably have quotes around the URL of the applet.
# (I think this is what's causing the problem you're seeing. To fix it,
# try putting single quotes around the URL).

> print "<applet
> code=http://free.prohosting.com/~klc400/WelcomeBanner/Welcome.class width=395
> height=50>";
> print "<param name=AppBGImage value=black.gif>";
> print "<param name=AppTile value=true>";
> print "<param name=DelayBetweenChars value=40>";
> print "<param name=DelayBetweenRuns value=5000>";
> print "<param name=Font value=TimesRoman>";
> print "<param name=HorizCenter value=true>";
> print "<param name=Pointsize value=20>";
> print "<param name=Style value=bold>";
> print "<param name=text1 value=Greetings()>";
> print "<param name=text2 value=\"Welcome to My Site\">";
> print "<param name=text3 value=\"You are visitor #";
>

# You should probably avoid splitting a string and then just printing
# each character. Why not just print the whole string?

> @nums = split(//, $Count);
> foreach $num (@nums) {
>         print $num;
>         }
> print " since September 9/98.\">";
>
> print "<param name=TextCount value=3>";
> print "<param name=VertCenter value=true>";
> print "</applet>";
>
> open (Counter, ">$counterfile");
> print Counter $Count;
> close (Counter);
>
>

You should probably rewrite this using CGI.pm.

hth,

Dave...

--
dave@mag-sol.com
London Perl M[ou]ngers: <http://www.mag-sol.com/London.pm/>

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


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

Date: Wed, 09 Sep 1998 09:34:52 GMT
From: dwiesel@my-dejanews.com
Subject: code value (like QUERY_STRING)
Message-Id: <6t5i3s$it3$1@nnrp1.dejanews.com>

Hi,

If I've got a value like this:

$value = "edvEDV =+&";

how do I code it so that I can send it to my perl program? Like this

<a href="my_perl_program.pl?value=%E5%E4%F6+%3D%2B%26">link</a>

// Daniel

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


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

Date: 09 Sep 1998 11:47:25 +0200
From: Tony Curtis <Tony.Curtis+usenet@vcpc.univie.ac.at>
Subject: Re: code value (like QUERY_STRING)
Message-Id: <83yartbosy.fsf@vcpc.univie.ac.at>

Re: code value (like QUERY_STRING), dwiesel
<dwiesel@my-dejanews.com> said:

dwiesel> Hi, If I've got a value like this:

dwiesel> $value = "edvEDV =+&";

dwiesel> how do I code it so that I can send it to my perl
dwiesel> program? Like this

dwiesel> <a href="my_perl_program.pl?value=%E5%E4%F6+%3D%2B%26">link</a>

perldoc URI::Escape

-- 
Tony Curtis, Systems Manager, VCPC,    | Tel +43 1 310 93 96 - 12; Fax - 13
Liechtensteinstrasse 22, A-1090 Wien,  | <URI:http://www.vcpc.univie.ac.at/>
"You see? You see? Your stupid minds!  | private email:
    Stupid! Stupid!" ~ Eros, Plan9 fOS.| <URI:mailto:tony_curtis32@hotmail.com>


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

Date: Wed, 09 Sep 1998 06:38:32 -0400
From: Bill 'Sneex' Jones <sneaker@sneex.fccj.org>
Subject: FileHandle.pm
Message-Id: <35F65AA8.825BDBF4@sneex.fccj.org>

Hi, it's me again :]

Taking a step back, I see in FileHandle.pm -

If C<FileHandle::open> is given a numeric mode, it passes that 
mode and the optional permissions value to the Perl C<sysopen> 
operator.  For convenience, C<FileHandle::import> tries to 
import the O_XXX constants from the Fcntl module.  If dynamic 
loading is not available, this may fail, but the rest of 
FileHandle will still work.


But I don't see where 'a numeric mode' is defined as
to what numeric modes are allowed.

Just curious...
-Sneex-  :]
__________________________________________________________________
Bill Jones | FCCJ Webmaster | http://webmaster.fccj.org/Webmaster
__________________________________________________________________
It is common sense to take a method and try it.  If it fails,
admit it frankly and try another.  But above all, try something.
                -- Franklin D. Roosevelt


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

Date: 09 Sep 1998 03:47:11 -0700
From: Russ Allbery <rra@stanford.edu>
Subject: Re: FileHandle.pm
Message-Id: <ylaf49imvk.fsf@windlord.stanford.edu>

Bill 'Sneex' Jones <sneaker@sneex.fccj.org> writes:

> Taking a step back, I see in FileHandle.pm -

> If C<FileHandle::open> is given a numeric mode, it passes that mode and
> the optional permissions value to the Perl C<sysopen> operator.  For
> convenience, C<FileHandle::import> tries to import the O_XXX constants
> from the Fcntl module.  If dynamic loading is not available, this may
> fail, but the rest of FileHandle will still work.

> But I don't see where 'a numeric mode' is defined as to what numeric
> modes are allowed.

Well, that's basically a reference to the sysopen documentation, which
says:

            The possible values and flag bits of the MODE parameter are
            system-dependent; they are available via the standard module
            `Fcntl'. For historical reasons, some values work on almost
            every system supported by perl: zero means read-only, one means
            write-only, and two means read/write. We know that these values
            do *not* work under OS/390 Unix and on the Macintosh; you
            probably don't want to use them in new code.

and then the Fcntl documentation says:

    Please refer to your native fcntl() and open() documentation to see what
    constants are implemented in your system.

which leads one to open(2), which has a comprehensive listing of the O_XXX
constants and what they do.  Not sure what the equivalent on Win32 is,
though.

-- 
#!/usr/bin/perl -- Russ Allbery, Just Another Perl Hacker
$^=q;@!>~|{>krw>yn{u<$$<[~||<Juukn{=,<S~|}<Jwx}qn{<Yn{u<Qjltn{ > 0gFzD gD,
 00Fz, 0,,( 0hF 0g)F/=, 0> "L$/GEIFewe{,$/ 0C$~> "@=,m,|,(e 0.), 01,pnn,y{
rw} >;,$0=q,$,,($_=$^)=~y,$/ C-~><@=\n\r,-~$:-u/ #y,d,s,(\$.),$1,gee,print


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

Date: Wed, 09 Sep 1998 06:04:04 -0400
From: Bill 'Sneex' Jones <sneaker@sneex.fccj.org>
To: Ronald J Kimball <rjk@coos.dartmouth.edu>
Subject: Re: IO::File Permissions - Enlightened!
Message-Id: <35F65294.98819595@sneex.fccj.org>

> [ A copy of this message has been posted to the newsgroup ]
> [     comp.lang.perl.misc                                 ]

Ronald J Kimball wrote:
> 
> Bill 'Sneex' Jones <sneaker@sneex.fccj.org> wrote:
> 
> > # This next line only works when my umask is 077;
> > umask 077; # Temporarily change it...
> > my $fh = new IO::File $file, "a", 0600;
>                                     ^^^^
> 
> Ignored, because your file mode is not numeric.

# Hmmm, please see perldoc IO::File below :]


> 
> When you get a chance, you really should read the docs for IO::File.
> Would it help if I posted the relevant section again?
> 
> Perhaps if I posted the actual code instead...
> 
> sub open {
>     @_ >= 2 && @_ <= 4 or
>         croak 'usage: $fh->open(FILENAME [,MODE [,PERMS]])';
>     my ($fh, $file) = @_;
>     if (@_ > 2) {
>         my ($mode, $perms) = @_[2, 3];

# How/where do you determine mode 2 should be used???
# Or is this array split thingy?

>         if ($mode =~ /^\d+$/) {
>             defined $perms or $perms = 0666;
>             return sysopen($fh, $file, $mode, $perms);
>         }
>         $file = _protect($file) if $file =~ m{\A[^\\/\w]};
>         $file = IO::Handle::_open_mode_string($mode) . " $file\0";
>     }
>     open($fh, $file);
> }
> 
> As you can plainly see, the $perms argument is used *if and only if* the
> $mode argument matches /^\d+$/.  Your mode of "a" does not match, so
> your perms of 0600 is ignored.
> 
> > Seriously, I do understand now, and I appreciate
> > everyone's patience while I was rambling :]
> 
> No, you still haven't gotten it, but you're welcome anyway.
> 

I see by perldoc IO::File that -
           use IO::File;

           $fh = new IO::File;
           if ($fh->open("< file")) {
               print <$fh>;
               $fh->close;
           }

           $fh = new IO::File "> file";
           if (defined $fh) {
               print $fh "bar\n";
               $fh->close;
           }

           $fh = new IO::File "file", "r";
# Mode "r" here LOOKS like a string to me...

           if (defined $fh) {
               print <$fh>;
               undef $fh;       # automatically closes the file
           }

           $fh = new IO::File "file", O_WRONLY|O_APPEND;
# And if I do this OWRONLY|O_APPEND, I get an error unless
# I 'use POSIX or Fcntl', and then I get an error saying:
# Filehandle Symbol::GEN0 opened only for input at security.pl line 22.
# Even though I used O_APPEND...

           if (defined $fh) {
               print $fh "corge\n";

               $pos = $fh->getpos;
               $fh->setpos($pos);

               undef $fh;       # automatically closes the file
           }

           autoflush STDOUT 1;

 ...Snip...

METHODS
       open( FILENAME [,MODE [,PERMS]] )
           open accepts one, two or three parameters.  With one
           parameter, it is just a front end for the built-in
           open function.  With two parameters, the first
           parameter is a filename that may include whitespace or
           other special characters, and the second parameter is
           the open mode, optionally followed by a file
           permission value.

           If IO::File::open receives a Perl mode string (">",
           "+<", etc.)  or a POSIX fopen() mode string ("w",
           "r+", etc.), it uses the basic Perl open operator.

           If IO::File::open is given a numeric mode, it passes
           that mode and the optional permissions value to the
           Perl sysopen operator.  For convenience,
           IO::File::import tries to import the O_XXX constants
           from the Fcntl module.  If dynamic loading is not
           available, this may fail, but the rest of IO::File
           will still work.

# Reading this last paragraph again, a question still pops-up:
# Again, what numeric modes are valid here?

Above section from perldoc IO::File, next section
is my test code:

#!/usr/bin/perl -w

use strict;
use diagnostics;
use POSIX;
use IO;

# Get the date in the format of 'Sun Sep  6 18:04:46 1998'
my $ltDate = localtime;

# Now get the Serialized Date, and string'em back together...
my ($seconds, $minutes, $hour, $monthDate, $month, 
$year, $weekDay, $yearDate, $daylightSavings) = localtime;
my $ltSerial =
"$seconds$minutes$hour$monthDate$month$year$weekDay$yearDate$daylightSavings";

my $file = "test.File";
#umask 077; # Temporary change...
my $fh = new IO::File $file, O_APPEND, 0600;

if (defined $fh) {
   print $fh "$ltSerial|$ltDate\n";
   undef $fh;
} else { print "Oops! $!"; }

autoflush STDOUT 1;


Totally confused now,
-Sneex-  :]
__________________________________________________________________
Bill Jones | FCCJ Webmaster | http://webmaster.fccj.org/Webmaster
__________________________________________________________________
It is common sense to take a method and try it.  If it fails,
admit it frankly and try another.  But above all, try something.
                -- Franklin D. Roosevelt


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

Date: Wed, 9 Sep 1998 10:35:48 +0200
From: "bubblesplit" <bubblesplit@pc.vom>
Subject: IRR Function needed
Message-Id: <35f65aa3.0@news.ip.pt>

This is a multi-part message in MIME format.

------=_NextPart_000_0053_01BDDBDD.9BCCFD80
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

>From Pedro Cordeiro   =20
HI , I,m writing a credit simulation script and i need a IRR function.=20
    Help me please is URGENT.

    Pedro.Cordeiro@publicis.pt
   =20


------=_NextPart_000_0053_01BDDBDD.9BCCFD80
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN">
<HTML>
<HEAD>

<META content=3Dtext/html;charset=3Diso-8859-1 =
http-equiv=3DContent-Type>
<META content=3D'"MSHTML 4.71.2110.0"' name=3DGENERATOR>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT color=3D#000000 size=3D2>From Pedro =
Cordeiro&nbsp;&nbsp;&nbsp;=20
</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2>HI , I,m writing a credit simulation =
script and=20
i need a IRR function. </FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2>&nbsp;&nbsp;&nbsp; Help me please is =

URGENT.</FONT>&nbsp;</DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#000000 size=3D2>&nbsp;&nbsp;&nbsp; <A=20
href=3D"mailto:Pedro.Cordeiro@publicis.pt">Pedro.Cordeiro@publicis.pt</A>=
</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2>&nbsp;&nbsp;&nbsp; </FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT>&nbsp;</DIV></BODY></HTML>

------=_NextPart_000_0053_01BDDBDD.9BCCFD80--



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

Date: Wed, 09 Sep 1998 10:39:11 +0200
From: Plate Forme Jeunes Diplomes <plateforme@wanadoo.fr>
Subject: Looking for a programm in Perl!:=)
Message-Id: <35F63EAE.5F45E58D@wanadoo.fr>

    Hello,

    I am looking for a script which is very simple :

    - it must extract  two character string which are between two words,
(the script must scan all the file ( the string are repetited!)
    - it must put the variables a new file and save this file.

    If you have ever made this soft or know how can I do, can you help
me please?



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

Date: Wed, 09 Sep 1998 09:24:46 BST
From: gml4410@ggr.co.uk (Lack Mr G M)
Subject: Re: merge arrays and strings
Message-Id: <1998Sep9.092446@ukwit01>

In article <6t3tu5$3v3$1@nnrp1.dejanews.com>, beju@my-dejanews.com writes:
|> hi folks,
|> 
|> i have a big problem with arrays.
|> 
|> how do i merge the contents of arrays and strings?

   You add the strings as elements of teh array.

|> the task: i have some files, whose contents I want to summarize.
|> the output of the summary should be looks like this:
|> 
|> fileOne - number 1:
|> Here is the complete contents of the file fileOne...
|> fileTwo - number 2:
|> Here is the complete contents of the file fileTwo...
|> ...and so on...
|>...
|>   @hold = @hold.$name." - number ".$num.":\n".@cont."\n";

   It has alreayd been pointed out that you are using the syntax for
catenating strings, not adding to arrays.

|> at least for me it seems to be logical. ;-)
|> ...but not for perl. :-(
|> 

   Nor for most other people.

   You are processing a problem in a serial fashion.  Why do you wish to
keep everything in memory until the end?  Why not print it out once you
have it?  This is far more efficient.

So:
 ------------------------------

$num=0;
@name=("fileOne", "fileTwo", "fileThree");
foreach $name (@name)
{
  $num++;
  open (FH, $name);                  # or die.....
  print "$name - number $num.\n";
  print while (<FH>);                # Copy line by line.
  close FH;
}


-- 
----------- Gordon Lack ----------------- gml4410@ggr.co.uk  ------------
The contents of this message *may* reflect my personal opinion.  They are
*not* intended to reflect those of my employer, or anyone else.


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

Date: Wed, 09 Sep 1998 08:04:19 GMT
From: pprongue@marvel.ch
Subject: Need help for locking files
Message-Id: <6t5cq2$c51$1@nnrp1.dejanews.com>

Hello everybody,

I need help to lock a file in my script below:

# open the file and get the content
open (FICHIER, $forum_file);
@messages = <FICHIER>;
close (FICHIER);

# work on the content
foreach $message (@messages) {
 ...
 ...
 ...
}

# write the new content in the file
open (FICHIER, ">" . $forum_file);
foreach $message (@messages) {
   print FICHIER "$message";
}
close (FICHIER);

It work fine when only one user use this script, but we have a lot of users
that use this script in the same time and sometimes, without protection, the
file become corrupted of empty.

Can somebody help me to lock the file and while a user is processing the file?
If a user is writing in the locking file, what happen to the other user?

I work with perl 5.003 on Solaris 2.5.

Thanks in advance for people who help me.

P.S.: Excuse me for my strange english, but it's not my mother tongue.

Pierre-Alain Prongui
pprongue@marvel.ch

Marvel Communications S.A.
Rte des Avouillons 12
1196 Gland (Switzerland)

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


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

Date: 9 Sep 1998 10:36:52 GMT
From: Zenin <zenin@bawdycaste.org>
Subject: Re: Need help for locking files
Message-Id: <905337275.249557@thrush.omix.com>

[posted & mailed]


pprongue@marvel.ch wrote:
    >snip<

    use Fcntl ':flock';

    open FICHIER, "+<$forum_file"
        or die "open($forum_file): $!";

    flock FICHIER, LOCK_EX
        or die "flock(): $!";

    @messages = <FICHIER>;

    # work on the content
    foreach $message (@messages) {
      ...
      ...
      ...
    }

    seek FICHIER, 0, 0
        or die "seek(): $!";

    # write the new content in the file
    foreach $message (@messages) {
        print FICHIER "$message";
    }

    close (FICHIER);

    __END__

    Note there is only one open() call.

-- 
-Zenin (zenin@archive.rhps.org)           From The Blue Camel we learn:
BSD:  A psychoactive drug, popular in the 80s, probably developed at UC
Berkeley or thereabouts.  Similar in many ways to the prescription-only
medication called "System V", but infinitely more useful. (Or, at least,
more fun.)  The full chemical name is "Berkeley Standard Distribution".


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

Date: Wed, 09 Sep 1998 06:08:41 -0400
From: Bill 'Sneex' Jones <sneaker@sneex.fccj.org>
Subject: Re: Off topic, but ... [Was Re: Perl & Java - differences and uses]
Message-Id: <35F653A9.D8B569CB@sneex.fccj.org>

Zenin wrote:
> 
> Martien Verbruggen <mgjv@comdyn.com.au> wrote:
> : In article <slrn6vbo3d.h6.alastair@calliope.demon.co.uk>,
> :       alastair@calliope.demon.co.uk (Alastair) writes:
>         >snip<
> : > So why stoop to that level?
> :
> : Revenge :)
> 
>         No matter how big your gun, it's hard to hit Redmond from
>         a small cave near the south poll.
> 

Oh I don't know, I don't think anyone will miss 
Washington State :]
-Sneex- 
__________________________________________________________________
Bill Jones | FCCJ Webmaster | http://webmaster.fccj.org/Webmaster
__________________________________________________________________
             I have to delete the saying that was here, 
             because I don't make any sense :]


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

Date: 9 Sep 1998 08:19:23 GMT
From: roberto@toutatis.net (Roberto)
Subject: Re: Perl Programmer Needed
Message-Id: <roberto-ya02408000R0909981020210001@news.euronet.nl>

In article <8cyarujflx.fsf@gadget.cscaper.com>, Randal Schwartz
<merlyn@stonehenge.com> wrote:

> But the current ban on jobs in non-job
> groups STILL STANDS.

I repeat: please tell me where to find it.
The lines that have been quoted in a previous article do not mention any
"decrete" or "ban" whatsoever.They _do_ urge you to consider choosing an
appropriate newsgroup for your posting. They also _suggest_ an appropriate
hiearchie. Thats it. That is not a ban, nor a decrete. In my opinion,
comp.lang.perl.misc _CAN_BE_ appropriate for a perl job posting provided
the comp.lang.perl.misc community thinks it is. And if the group would get
flooded with perl job postings, create comp.lang.perl.jobs. You think that
would be inconvenient? Or harmful for the reputation of the language?

-- 
Roberto Bourgonjen,
roberto@toutatis.net


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

Date: 9 Sep 1998 10:27:37 GMT
From: Zenin <zenin@bawdycaste.org>
Subject: Re: Perl Programmer Needed
Message-Id: <905336720.60737@thrush.omix.com>

Roberto <roberto@toutatis.net> wrote:
: I repeat: please tell me where to find it.
: The lines that have been quoted in a previous article do not mention any
: "decrete" or "ban" whatsoever.They _do_ urge you to consider choosing an
: appropriate newsgroup for your posting. They also _suggest_ an appropriate
: hiearchie. Thats it. That is not a ban, nor a decrete. In my opinion,
: comp.lang.perl.misc _CAN_BE_ appropriate for a perl job posting provided
: the comp.lang.perl.misc community thinks it is. And if the group would get
: flooded with perl job postings, create comp.lang.perl.jobs. You think that
: would be inconvenient? Or harmful for the reputation of the language?

        Since no one is going to throw you in jail for most posts of nearly
        any subject or content, all USENET "rules" are self enforced.

        It takes quite the talented ass hole to break the rules bad enough
        and often enough before any real recourse will be taken.  It's
        pretty much an honor and respect system, one in which users are
        expected to be mature enough to respect and handle.  As such,
        a flat "ban" or "decrete" would be to disrespect the users.  Sometimes
        this is needed (moderated groups), but mostly we strive to avoid
        such arbitrary restrictions.

        You could keep on posting job listings all the time, likely with
        little or no tangible reprocussions.  We would hope however, that
        you would have the respect for USENET that we do, and refrain from
        such actions.  But yes, if it got bad enough there are actions that
        can and would be taken.

-- 
-Zenin (zenin@archive.rhps.org)           From The Blue Camel we learn:
BSD:  A psychoactive drug, popular in the 80s, probably developed at UC
Berkeley or thereabouts.  Similar in many ways to the prescription-only
medication called "System V", but infinitely more useful. (Or, at least,
more fun.)  The full chemical name is "Berkeley Standard Distribution".


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

Date: Wed, 09 Sep 1998 07:51:51 GMT
From: greenej@my-dejanews.com
Subject: Re: Problems with UNC on Windows platforms
Message-Id: <6t5c2m$bb7$1@nnrp1.dejanews.com>

In article <6t0p0a$lh7$1@news.imp.ch>,
  "Claudio Felber" <felber@cybernetic.ch> wrote:
> Hi!
>
> I need to create directories and access files over UNC paths on
> Windows systems. Opening and working with files is no problem,
> but path manipulations such as creating or changing directories
> is. Probably because the Perl functions are based on the functionality
> of the basic change/make directory of Windows consoles which also
> do not work with UNC. So, what am I going to do? I would like to
> do something like that:
>
>     chdir '//PDC-Intranet/Backup'             or
>     chdir "\\\\PDC-Intranet\\Backup'          or
>     mkdir '//PDC-Intranet/Backup/Linux'
>
>     etc...
>
> Any ideas?
> -Claudio
>

A non-portable (and un-tested) solution for WinNT would be:

my $UNC = "//PDC-Intranet/Backup";
$UNC =~ tr!/!\\!;
my $result = `NET USE T: $UNC`;
die "Dooohhh: $result" unless ($result =~ /successful/);

then you can use the Perl functions with drive T:

chdir "T:/";
mkdir "T:/Linux"
 ...

HTH,

JAGreene
--
# James Greene - Informatics Consulting - D-79539 Loerrach, Germany
# Internet: www.gucc.org/greene/consult - greene@gucc.org
# PGP Fingerprint: CA88 9BE2 92B3 3162 DF6B  7080 2F9E A97E F25C 5972
perl -we "$_=join'<',qw{d2by' f5e;f4z($iu w0@86yo=&ae b!097)l(&aa8vme
b$*};$_=unpack'u*',uc;print"

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


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

Date: Wed, 09 Sep 1998 11:43:38 GMT
From: drummj@mail.mmc.org (Jeffrey R. Drumm)
Subject: Re: Problems with UNC on Windows platforms
Message-Id: <35f66248.58417389@news.mmc.org>

On Wed, 09 Sep 1998 07:51:51 GMT, greenej@my-dejanews.com wrote:

>In article <6t0p0a$lh7$1@news.imp.ch>,
>  "Claudio Felber" <felber@cybernetic.ch> wrote:
>> Hi!
>>
>> I need to create directories and access files over UNC paths on
>> Windows systems. Opening and working with files is no problem,
>> but path manipulations such as creating or changing directories
>> is. Probably because the Perl functions are based on the functionality
>> of the basic change/make directory of Windows consoles which also
>> do not work with UNC. So, what am I going to do? I would like to
>> do something like that:
>>
>>     chdir '//PDC-Intranet/Backup'             or
>>     chdir "\\\\PDC-Intranet\\Backup'          or
>>     mkdir '//PDC-Intranet/Backup/Linux'
>>
>>     etc...
>>
>> Any ideas?
>> -Claudio
>>
>
>A non-portable (and un-tested) solution for WinNT would be:
>
>my $UNC = "//PDC-Intranet/Backup";
>$UNC =~ tr!/!\\!;
>my $result = `NET USE T: $UNC`;
>die "Dooohhh: $result" unless ($result =~ /successful/);
>
>then you can use the Perl functions with drive T:
>
>chdir "T:/";
>mkdir "T:/Linux"
>...
>
>HTH,
>
>JAGreene

I just tried the following against one of the NT servers here and had no
problems at all (Perl 5.004_02, GSAR port):

#!perl -w

mkdir "//zilla/snaserv/temp/tempdir",444 or die "couldn't mkdir: $!\n";
chdir "//zilla/snaserv/temp/tempdir" or die "couldn't chdir: $!\n";
open OUT,">myfile.txt" or die "couldn't open for write: $!\n";
print OUT "Hi there!\n";
close OUT or die "couldn't close: $!\n";
__END__

The file "myfile.txt" was created in the \temp\tempdir directory on the snaserv
share of the Zilla server, and had the expected contents. Worked fine with
shares on Netware servers as well.

I wonder if the original poster is attempting to create/delete/manipulate these
directories on publicly accessible shares? I couldn't get the above to work on
administrative shares (\\zilla\c$, for example), although I didn't try very
hard.

I also wonder if the the script is running under an account that has network
access . . . Normally, the system account that the scheduler service runs under
does not have access to the network, but one can run the scheduler service
under another account. If it's run as a CGI script, I suspect web server
account rights may be the problem.

-- 
                               Jeffrey R. Drumm, Systems Integration Specialist
                       Maine Medical Center - Medical Information Systems Group
                                                            drummj@mail.mmc.org
"Broken? Hell no! Uniquely implemented!" - me


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

Date: Wed, 09 Sep 1998 09:26:30 GMT
From: newsgrp@business-heaven.com
Subject: regexp teaser
Message-Id: <6t5hk6$ii0$1@nnrp1.dejanews.com>

hi,
Consider the following.

The following html has been read into @HTMLLINES using the perl snippet....
unless(open(HTMLDOC, "<$htmldoc")) {
		print "Can't open $htmldoc for input: $!";
		exit;
	}
@HTMLLINES=<HTMLDOC>;
close HTMLDOC;

the html....
<html>
<meta name=keywords content="Keyword1 Keyword2 Keyword3">
</html>

What is the most efficient regexp to tokenize the keywords?

All help is greatly appreciated

Terry

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


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

Date: Wed, 9 Sep 1998 05:22:56 +0100
From: Jerry Pank <jerryp.usenet@connected.demon.co.uk>
Subject: Re: Why Perl ?
Message-Id: <EC8e1MAgKg91EwFR@connected.demon.co.uk>

In <comp.lang.perl.misc> 
M.J.T. Guy <mjtg@cus.cam.ac.uk>, writes:
<deletia>
>    perl -wde 42
>
>You don't even have to write a script.    And the Perl debugger gives
>you history as well.

Is there a way, with a $atan$pawn O$ to use command line perl (and not
have the results scroll off into oblivion)?

Yes, yes. I know get a prope...
-- Jerry Pank                    mailto:jerryp.usenet@netconnected.com

Sometimes we choose the generalization.  Sometimes we don't.
-- Larry Wall in <199709032332.QAA21669@wall.org>


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

Date: 12 Jul 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 Mar 98)
Message-Id: <null>


Administrivia:

Special notice: in a few days, the new group comp.lang.perl.moderated
should be formed. I would rather not support two different groups, and I
know of no other plans to create a digested moderated group. This leaves
me with two options: 1) keep on with this group 2) change to the
moderated one.

If you have opinions on this, send them to
perl-users-request@ruby.oce.orst.edu. 


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 3667
**************************************

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