[18899] in Perl-Users-Digest
Perl-Users Digest, Issue: 1067 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Jun 5 21:06:02 2001
Date: Tue, 5 Jun 2001 18:05:17 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <991789517-v10-i1067@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Tue, 5 Jun 2001 Volume: 10 Number: 1067
Today's topics:
Re: "The Camel Book", "The Ram Book" or "Perl : The Pro (Richard Williams)
Re: $^O value for PERL on a Macintiosh (Joe Smith)
Re: $^O value for PERL on a Macintiosh (Joe Smith)
Re: $^O value for PERL on a Macintiosh (Clinton A. Pierce)
Re: 2 questions about flock (Steve)
Re: Best way to do this? <somewhere@in.paradise.net>
Buggy chomp behaviour (was Re: ReadLine requiring ^D to (Sweth Chandramouli)
Re: date calc modules <newspost@coppit.org>
Re: Deleting old files (Abigail)
Easier access to system call output - maybe output to <wellhaven@worldnet.att.net>
Re: Easier access to system call output - maybe output (Damian James)
Re: frustration with cgi.pm and setting cookies. (Clinton A. Pierce)
Re: Good editor for perl Use Scite ! <simon@super-simon.com>
Re: help with hashes <smarshal@attcanada.ca>
Re: help with hashes <buggs-clpm@splashground.de>
Re: How can I generate unique number combinations? <skilchen@swissonline.ch>
Re: Net::RawIP anybody can help? (Michael Fuhr)
Re: Newbie Question (Alan Barclay)
Re: OT :: What to do if you've been kill filed (Tad McClellan)
Re: OT :: What to do if you've been kill filed (Dave Bailey)
Re: OT :: What to do if you've been kill filed <flavell@mail.cern.ch>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Tue, 5 Jun 2001 23:29:29 +0000 (UTC)
From: rdwillia@hgmp.mrc.ac.uk (Richard Williams)
Subject: Re: "The Camel Book", "The Ram Book" or "Perl : The Programmer's Companion - Nigel Chapman"
Message-Id: <9fjq0p$mhn$1@niobium.hgmp.mrc.ac.uk>
In article <m166ecjoue.fsf@totally-fudged-out-message-id>,
Harry Putnam <reader@newsguy.com> wrote:
>merlyn@stonehenge.com (Randal L. Schwartz) writes:
>> Yeah, sadly, Learning Perl 3rd ed was not quite ready for this CD,
>> although Learning Perl 2ed was outdated. Oh well, you can still get
>> Learning Perl 3rd ed in a searchable online form through the Safari
>> service the moment it comes out.
>Alternatively, can you elaborate a little about the Safari service for
>the uninitiated? Will that release have some kind of thorough search
>tool?
It's a real pity Learning Perl didn't quite make it on to the Bookshelf
this time around - the previous edition on the original CD was often the
best place to look for clarification of some fundamental point. The Safari
service Randal is referring to can be found here:
http://safari2.oreilly.com/tablhom.asp?home
It's O'Reilly's Evil Scheme to rent out their books as subscription web
pages, starting at $10 a month for five titles. You have agree to delete
anything you've downloaded if your subscription lapses, so it's not
exactly an ideal alternative to the CD :-( The search engine seems pretty
good, though.
Richard.
------------------------------
Date: Wed, 6 Jun 2001 00:00:19 +0000 (UTC)
From: inwap@best.com (Joe Smith)
Subject: Re: $^O value for PERL on a Macintiosh
Message-Id: <9fjrqj$2uf4$1@nntp1.ba.best.com>
In article <1eu83fh.1no41vr9yvxs0N%g.durr@free.fr>,
Guillaume DURR <g.durr@free.fr> wrote:
>$0 print the name of the script that is being executed
Looks like you need to change the font used by your news reader; it
has caused you to confuse a zero (0) with a capital-o (O).
00O0OO = zero zero oh zero oh oh
--
See http://www.inwap.com/ for PDP-10 and "ReBoot" pages.
------------------------------
Date: Wed, 6 Jun 2001 00:03:41 +0000 (UTC)
From: inwap@best.com (Joe Smith)
Subject: Re: $^O value for PERL on a Macintiosh
Message-Id: <9fjs0t$2ufn$1@nntp1.ba.best.com>
In article <9ejt3n$nbk$1@newsg3.svr.pol.co.uk>,
Leona Browning <leona_browning@hotmail.com> wrote:
>Anyone know what Print $^O returns for Perl runnin on a Macintosh ?
>I've used the above method to trap for a windows machine now I need to
>isolate some code for Macperl and I dont have access to a Mac
If you are going to be parsing files names for Win32 and MacOS, you need
to take a look at the File::Basename.pm to make your script portable.
It has several tests on $^O, including one similar to this:
$ignorecase = ($^O =~ /^(?:MacOS|VMS|AmigaOS|os2|RISCOS|MSWin32|MSDOS)/i);
-Joe
--
See http://www.inwap.com/ for PDP-10 and "ReBoot" pages.
------------------------------
Date: Wed, 06 Jun 2001 00:15:19 GMT
From: clintp@geeksalad.org (Clinton A. Pierce)
Subject: Re: $^O value for PERL on a Macintiosh
Message-Id: <rCeT6.34264$DG1.5844354@news1.rdc1.mi.home.com>
In article <9fjrqj$2uf4$1@nntp1.ba.best.com>,
inwap@best.com (Joe Smith) writes:
> 00O0OO = zero zero oh zero oh oh
It's got a nice beat, but it's hard to dance to. I give it a 58.
--
Clinton A. Pierce Teach Yourself Perl in 24 Hours *and*
clintp@geeksalad.org Perl Developer's Dictionary -- May 2001
"If you rush a Miracle Man, for details, see http://geeksalad.org
you get rotten Miracles." --Miracle Max, The Princess Bride
------------------------------
Date: 5 Jun 2001 23:12:39 GMT
From: steve@zeropps.uklinux.net (Steve)
Subject: Re: 2 questions about flock
Message-Id: <slrn9hqpm5.mhl.steve@zero-pps.localdomain>
On 5 Jun 2001 19:59:59 GMT, Eric Bohlman wrote:
>Steve <steve@zeropps.uklinux.net> wrote:
>> Can I open a file read it's contents and rewrite the
>> enitre file before soemone else gets to write to it?
>
>Yep. You need to open it in read/write mode, get an exclusive lock on it,
>read it, truncate it, rewrite it, and close it. The point is that you
>have to keep the lock on it throughout the process: a common beginner's
>mistake is opening the file in read mode, locking it, reading it, closing
>it, opening it in write mode, locking it, rewriting it, and then closing
>it. In between the first close and the second open, the file is unlocked
>and another process can get at it.
Thanks I'll look up truncate in the docs. I was thinking of using all sorts
of secondary lock files, but this sounds like a much better idea.
--
Cheers
Steve email mailto:steve@zeropps.uklinux.net
%HAV-A-NICEDAY Error not enough coffee 0 pps.
web http://www.zeropps.uklinux.net/
or http://start.at/zero-pps
11:34pm up 124 days, 23 min, 2 users, load average: 1.18, 1.08, 1.03
------------------------------
Date: Wed, 6 Jun 2001 08:20:58 +1000
From: "Tintin" <somewhere@in.paradise.net>
Subject: Re: Best way to do this?
Message-Id: <BXcT6.1$GB5.16401@news.interact.net.au>
"BCC" <bcoon@sequenom.com> wrote in message
news:3B1CFF8C.392C36F1@sequenom.com...
> Thanks for the replys, both solutions were very elegant!
And what were the solutions???
Point being, that you should summarise the answers in your reply. Remember
that not everyone has been following the thread, so I've potentially missed
out on some useful information.
------------------------------
Date: Tue, 05 Jun 2001 22:49:16 GMT
From: sweth+perl@gwu.edu (Sweth Chandramouli)
Subject: Buggy chomp behaviour (was Re: ReadLine requiring ^D to terminate)
Message-Id: <MldT6.55238$G5.12085783@news1.rdc1.md.home.com>
I'm hoping that isolating the possible causes of the strange
chomp behaviour I'm seeing will help me track down the strange ReadLine
behaviour by inference. This is the code around the chomp statement in
the script in question, with some extra debugging code added:
print STDOUT "Prechomp:\n";
print STDOUT (map { "'$_': ".ord ($_)."\n" } (split ('', $user_input)));
chomp ($user_input); # ??why does the newline show up via readline?
print STDOUT "Postchomp:\n";
print STDOUT (map { "'$_': ".ord ($_)."\n" } (split ('', $user_input)));
print STDOUT "RS:\n";
print STDOUT (map { "'$_': ".ord ($_)."\n" } (split ('', $/)));
__END__
. When I run that script, I get the following output:
$ ./broken_script
Message ID [null]: 123
^D
Prechomp:
'1': 49
'2': 50
'3': 51
'
': 10
Postchomp:
'1': 49
'2': 50
'3': 51
'
': 10
RS:
'
': 10
, where "123\n<ctrl-d>" is the text that I enter in response
to the "Message ID" prompt, with the ^D being necessary to cause ReadLine
to return as per my previous post.
If I put the same seven lines of code in a script of its own
with $user_input hardcoded as follows:
#!/usr/local/bin/perl -w
$user_input = "123\n";
print STDOUT "Prechomp:\n";
print STDOUT (map { "'$_': ".ord ($_)."\n" } (split ('', $user_input)));
chomp ($user_input); # ??why does the newline show up via readline?
print STDOUT "Postchomp:\n";
print STDOUT (map { "'$_': ".ord ($_)."\n" } (split ('', $user_input)));
print STDOUT "RS:\n";
print STDOUT (map { "'$_': ".ord ($_)."\n" } (split ('', $/)));
__END__
, I get the following output:
$ ./working_script
Prechomp:
'1': 49
'2': 50
'3': 51
'
': 10
Postchomp:
'1': 49
'2': 50
'3': 51
RS:
'
': 10
. Does anybody have any suggestions as to why chomp, when
used on an identical string with an identical $RS, would remove the
newline in one case but not the other? Is it possible that the ^D is
being included in $user_input by ReadLine but for some reason is not
showing up in my pre-/post-chomp displays?
Any suggestions people have for further investigation of
this or my ReadLine problem would really be appreciated; I'm already
a week past my deadline for getting this script finished because of
this problem, and I'm really starting to consider just scrapping it and
spending two weeks rewriting it in ksh. :(
-- Sweth.
--
Sweth Chandramouli ; <svc@sweth.net>
------------------------------
Date: Tue, 5 Jun 2001 19:57:14 -0400
From: David Coppit <newspost@coppit.org>
Subject: Re: date calc modules
Message-Id: <Pine.SUN.4.33.0106051956270.27574-100000@mamba.cs.Virginia.EDU>
On Tue, 5 Jun 2001, Steffen Beyer wrote:
> Rob Parker <chickenmilkbomb@hotmail.com> wrote:
>
> > I am looking for a module that will allow me to calulate dates in the
> > future. I need to take the current date (or any arbitrary date) and
> > calculate the settlement date for a trade 3 *business* days in the
> > future.
>
> In Date::Calc version 5.0, this is very easy:
Date::Manip can also do this easily. Date::Manip is slower, but
is also more flexible.
David
------------------------------
Date: Tue, 5 Jun 2001 23:18:49 +0000 (UTC)
From: abigail@foad.org (Abigail)
Subject: Re: Deleting old files
Message-Id: <slrn9hqq6p.h5q.abigail@tsathoggua.rlyeh.net>
Craig Berry (cberry@cinenet.net) wrote on MMDCCCXXXV September MCMXCIII
in <URL:news:thq7jp64oq11b7@corp.supernews.com>:
** Steve (cochise@sky.net) wrote:
** : @FILES = grep -M > .5, <9*.gif>;
** :
** : foreach $FILES (@FILES) {
** : unlink $FILES;
** : }
**
** By convention, ordinary perl variables are mixed or lower-case. Following
** this convention will make you code more readable by others and cleaner
** looking when mixing your own names with those imported from modules.
Readability is in the eye of the beholder. Just because you (and some
others) feel so doesn't make it universal. I do utterly fail to see the
remark related to importing names from modules - are you implying that
using names for modules suddenly decreases readabilty, but changing the
case of non-imported variable names magically fixes that?
** Also, it's a useful habit to give simple scalars singular rather than
** plural names.
**
** Given that unlink takes a list of files, you can express your approach
** more compactly as
**
** unlink grep -M > .5, <9*.gif>;
While this is certainly possible, it should certainly *NOT* be recommended.
Always, always, ALWAYS check the return value of your systems calls.
Just do it. Just because you can appear cleaver by folding a few
lines into one doesn't give you an excuse to ignore the result.
map {/^\d+\.gif$/ and -M > .5 and (unlink or die "unlink $_ failed: $!")} <*>;
Still a single line, but checks the return value, and takes care of the
"starts with a 9" problem too.
Abigail
--
$_ = "\x3C\x3C\x45\x4F\x54";
print if s/<<EOT/<<EOT/e;
Just another Perl Hacker
EOT
------------------------------
Date: Wed, 06 Jun 2001 00:01:10 GMT
From: "Will Cardwell" <wellhaven@worldnet.att.net>
Subject: Easier access to system call output - maybe output to a scaler?
Message-Id: <apeT6.4944$Ji.430203@bgtnsc04-news.ops.worldnet.att.net>
Hello,
In VMS (sorry), I would like to do system commands and operate on the output
from the call in the simplest way, say output to a scaler instead of a file.
I've been doing the thing simulated here, but it takes several statements:
$tmpfile='tempfile.tmp';
system qq(dir *.txt > $tmpfile); # changed here to work in Unix and Win
open TEMP, "$tmpfile" or "die can't open $tmpfile for input: $!";
while (<TEMP>) {
print "$i $_"; # Prove it works
$i++;
}
close TEMP;
unlink $tmpfile;
Of course I could do an ordinary "DIR" in a perl way, but I have to do other
VMS specific commands, many in one program.
Also, I only have a standard binary perl on VMS and would like not to have
to install extra packages, which I haven't had to do yet.
Any help is appreciated.
Regards,
Will Cardwell.
------------------------------
Date: 6 Jun 2001 00:51:27 GMT
From: damian@qimr.edu.au (Damian James)
Subject: Re: Easier access to system call output - maybe output to a scaler?
Message-Id: <slrn9hqvk5.k44.damian@puma.qimr.edu.au>
Will Cardwell chose Wed, 06 Jun 2001 00:01:10 GMT to say this:
>
>In VMS (sorry), I would like to do system commands and operate on the output
>from the call in the simplest way, say output to a scaler instead of a file.
>I've been doing the thing simulated here, but it takes several statements:
[example snipped]
>Of course I could do an ordinary "DIR" in a perl way, but I have to do other
>VMS specific commands, many in one program.
>Also, I only have a standard binary perl on VMS and would like not to have
>to install extra packages, which I haven't had to do yet.
I don't know the VMS equivalent (or even if there is one), but in *nix
you'd be better off using the piped version of open():
open PROG, 'system_command|' or die $!; # etc
Then operating on the filehandle as normal. Knowing nothing about VMS,
I can't say any more (except that maybe you should look at perldoc -f open
for you installation).
Backticks also come to mind -- is there a VMS reason why you can't use
those?
HTH
Cheers,
Damian
--
this is not a .sig
------------------------------
Date: Tue, 05 Jun 2001 22:30:28 GMT
From: clintp@geeksalad.org (Clinton A. Pierce)
Subject: Re: frustration with cgi.pm and setting cookies.
Message-Id: <84dT6.33729$DG1.5760094@news1.rdc1.mi.home.com>
In article <slrn9hqi7g.3qv.gbusker@ether.home>,
gbusker@nospam-postmaster.co.uk (Gerd Busker) writes:
> On Thu, 31 May 2001 13:12:53 +0200,
> There are some issues with Location: and Set-Cookie headers in
> some webservers.
On IIS, setting a cookie and performing a redirect at the same time
requires that the script be an nph- script.
--
Clinton A. Pierce Teach Yourself Perl in 24 Hours *and*
clintp@geeksalad.org Perl Developer's Dictionary -- May 2001
"If you rush a Miracle Man, for details, see http://geeksalad.org
you get rotten Miracles." --Miracle Max, The Princess Bride
------------------------------
Date: Wed, 6 Jun 2001 01:11:24 +0200
From: "Super-Simon" <simon@super-simon.com>
Subject: Re: Good editor for perl Use Scite !
Message-Id: <9fjonu$eo6$1@news1.xs4all.nl>
Yes, Scite is really good!
"Graham Stow" <graham@letsgouk.com> wrote in message
news:03gbcVAvvpE7EwA1@letsgouk.com...
> Scite!! What A find!!!
>
> At first glance it looks incredibly versatile for such a small package.
>
> Ooooooooooh! Line numbers too!!! (I used to copy from Notepad and paste
> in Excel to know what lines I was on!).
>
> Shame the Help doesn't work, though.
>
> I'll be using Scite all the time from now on.
>
> Thanks a million Christophe!
> --
> Graham Stow
------------------------------
Date: Tue, 5 Jun 2001 19:34:33 -0400
From: "Steve Marshall" <smarshal@attcanada.ca>
Subject: Re: help with hashes
Message-Id: <T0eT6.33235$TW.167455@tor-nn1.netcom.ca>
Here is a simpler script that I also used.
while (<>) {
$seen{$_}++;
}
while ( ($line, $count) = each %seen ) {
if ($count > 1) {
print "$count $line";
}
}
Essentially I have a text file that contains a series of records. Should I
split the records using > ? Now what I want to include is the Query and
Sbjct lines as well.
>gi
junk
Query
Sbjct
>gi
junk
Query
Sbjct
>gi
junk
Query
Sbjct
"Steve Marshall" <smarshal@attcanada.ca> wrote in message
news:gZzS6.32624$TW.163480@tor-nn1.netcom.ca...
> Howdy!
> I am trying to parse a text file where I can pull out identical header
lines
> that are repeated throughout the file. I also want to retrieve two
> additional lines (Hello and Goodbye) within each record.
>
> Ex.
> >blahblah
> junk
> junk
> Hello
> Goodbye
> >blahblah
> junk
> junk
> Hello
> Goodbye
> >blahblah
> junk
> junk
> Hello
> Goodbye
>
> This is my code. I can pull out the header but I'm having trouble getting
> the Hello and Goodbye lines.
>
> #!/usr/local/bin/perl -w
> use strict;
> my %seen;
>
> my $file = $ARGV[0];
> open IN, $file or die "cannot open \"$file\": $!";
>
> while (my $line = <IN>) {
>
> if ($line =~ /^>gi/) {
> my @fields = split />/, $line;
> $seen{$fields[1]}++;
> }
> }
>
> close IN;
>
> foreach my $fields (sort { $seen{$b} <=> $seen{$a} } keys %seen)
> {
> print "Hits: $seen{$fields}\n$fields\n";
> }
>
> prints
> Hits: 1
> >blahblah
> Hits: 1
> >blahblah
>
> thanks for your help!
> sm
>
>
------------------------------
Date: Wed, 6 Jun 2001 02:56:22 +0200
From: buggs <buggs-clpm@splashground.de>
Subject: Re: help with hashes
Message-Id: <9fjv53$12j$07$1@news.t-online.com>
Steve Marshall wrote:
> Here is a simpler script that I also used.
>
> while (<>) {
> $seen{$_}++;
> }
> while ( ($line, $count) = each %seen ) {
> if ($count > 1) {
> print "$count $line";
> }
> }
>
> Essentially I have a text file that contains a series of records. Should I
> split the records using > ? Now what I want to include is the Query and
> Sbjct lines as well.
You migth want to have a look at Regular Expressions.
Splitting is also a good maybe better approach,
this depends on your data.
Buggs
------------------------------
Date: Wed, 6 Jun 2001 02:59:44 +0200
From: "Samuel Kilchenmann" <skilchen@swissonline.ch>
Subject: Re: How can I generate unique number combinations?
Message-Id: <9fjveq$4e0ud$1@ID-13368.news.dfncis.de>
"Chris Spurgeon" <cspurgeon@electronicink.com> schrieb im Newsbeitrag
news:5643c417.0106050640.604f34ce@posting.google.com...
> Given a series of digits, I want to generate all of the different ways
> they can be arranged. So, for example, for the numbers 1, 2, 3, 4 and
> 5 I would generate output like this...
>
If you want to produce possibly huge lists of permutations you might
want to try out something faster than the tsc-permute from perlfaq4,
maybe something like this:
--------%<------------------------------------------------
#!perl -w
use strict;
# fast permutation algorithm by A.D. Woodall,
# published in Computer Journal (1977, 346-349)
# modified to output the permutations in
# lexicographical order.
#
sub permute_woodall_lexicographic {
my $list_ref = shift;
my $callback = shift;
my @list = @{$list_ref};
my $n = $#list;
my @idx = reverse (0 .. $n);
my $nextperm;
$nextperm = sub {
my $n = shift;
if ($n == 1) {
@idx[0,1] = @idx[1,0];
$callback->(@list[@idx]);
}
else {
for (my $m = $n - 1; $m >= 0; $m--) {
$nextperm->($n - 1);
my $k = int(($n - 1) / 2);
for (my $i = 0; $i <= $k; $i++) {
@idx[$i, ($n - $i - 1)] = @idx[($n - $i - 1), $i];
}
@idx[$n, $m] = @idx[$m, $n];
$callback->(@list[@idx]);
}
$nextperm->($n - 1);
}
};
$callback->(@list[@idx]);
$nextperm->($n);
}
sub display_perm {
my @list = reverse(@_);
print "@list\n";
}
my @data = (1 .. $ARGV[0]);
permute_woodall_lexicographic(\@data, \&display_perm);
--------%<------------------------------------------------
If you want to see some permutations from a moderately large input list,
then something like this should work. This one is rather slow because it
uses big integer arithmetic as implemented in Math::BigInt.
--------%<------------------------------------------------
#!perl -w
use Math::BigInt;
use strict;
#
# algorithm to compute arbitrary permutations by J.S. Rohl
# published in Computer Journal 4, 21
# permutations are numbered according to their lexicographical order
# for a list of n items the permutations are numbered from 0 to n!-1
#
my $ONE = Math::BigInt->new("1");
sub permute_from_to {
my $list_ref = shift;
my $first_permutation = shift;
my $last_permutation = shift;
my $callback = shift;
my @list = @{$list_ref};
my $n = scalar(@list);
my @fac = ();
$fac[0] = $ONE;
for (my $i = 1; $i <= $n; $i++) {
$fac[$i] = $fac[$i - 1] * $i;
}
my @idx;
my $nextperm;
$nextperm = sub {
my $permutation_number = shift;
my %remaining;
@remaining{(0..$n)} = ();
for (my $i = $n - 1; $i >= 0; $i--) {
my $pos = $ONE + ($permutation_number / $fac[$i]) % ($i + 1);
my $j = 0;
my $count = 0;
do {
$j++;
if (exists($remaining{$j})) {
$count++;
}
} until ($count == $pos);
$idx[$i] = $j - 1;
delete $remaining{$j};
}
};
for (my $i = $first_permutation; $i <= $last_permutation; $i++) {
$nextperm->($i);
$callback->($i, @list[reverse @idx]);
}
}
sub display_perm {
my $permutation_nr = shift;
printf("%6s: ", $permutation_nr);
print "@_\n";
}
my $first = shift;
my $last = shift;
$first = Math::BigInt->new($first);
$last = Math::BigInt->new($last);
my @data = (1..$ARGV[0]);
permute_from_to(\@data, $first, $last, \&display_perm);
--------%<------------------------------------------------
------------------------------
Date: 5 Jun 2001 16:54:17 -0600
From: mfuhr@dimensional.com (Michael Fuhr)
Subject: Re: Net::RawIP anybody can help?
Message-Id: <9fjnup$6eo@flatland.dimensional.com>
"Alex Randol" <frank.castle@marvelknights.net> writes:
> I set source source to an adress (in ip => {...}) to some others host adress
> to fake a ip (udp) package to look like from another host. But send told me
> that it could not send this package ("sendto(): Cannot assign requested
> adress") because it could n't be assigned. Is it possible to fake an IP
> package with Net::RawIP and how does it work? I think it should be possible
> because this package is intended to manipulate IP packages.
Indeed it is, and it's worked fine for me. Spoofing packets is a
useful White Hat tool, although Black Hats can certainly use it for
their own nefarious purposes. I've used Net::Rawip extensively to
troubleshoot connectivity problems through firewalls.
> Note: I am using Irix 5.3, Net::RawIP compiled fine
I suppose there could be an issue with Irix; it's worked for me on
Solaris, FreeBSD, and Linux. Here's an example that should send
a UDP packet from 10.1.2.3:1234 to 10.3.4.5:5678:
#!/usr/bin/perl -Tw
use Net::RawIP;
use strict;
my $ip = Net::RawIP->new({
ip => {
saddr => "10.1.2.3",
daddr => "10.3.4.5",
},
udp => {
source => "1234",
dest => "5678",
data => "What hath Larry wrought?",
},
});
$ip->send(0, 1);
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
------------------------------
Date: 5 Jun 2001 22:30:52 GMT
From: gorilla@elaine.furryape.com (Alan Barclay)
Subject: Re: Newbie Question
Message-Id: <991780208.807785@elaine.furryape.com>
In article <3B1D44FF.49635063@stomp.stomp.tokyo>,
Godzilla! <godzilla@stomp.stomp.tokyo> wrote:
>However! However, Indigo Perl also includes ActiveState Perl,
>already configured and ready to go, requiring nothing more
>than a click of a virtual button and reboot. After this, just
As usual, Godzilla is wrong.
IndigoPerl does not include ActiveState perl, it's a straight
build from the sources.
------------------------------
Date: Tue, 5 Jun 2001 16:30:39 -0400
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: OT :: What to do if you've been kill filed
Message-Id: <slrn9hqgbe.346.tadmc@tadmc26.august.net>
Lou Moran <lmoran@wtsg.com> wrote:
>On 5 Jun 2001 11:14:02 GMT, rachel@lspace.org (Rachel Coleman) wrote
>wonderful things about sparkplugs:
>
>SNIP
>>I think you also have to look at why you were killfiled and why that
>>bothers you. Why do you want a particular person to read your posts?
>SNIP
>
>I was wondering with the large
>amount of plonk(ing) and public KFs
I expect that the total kills are an order of magnitude greater than
the number of public kills. The overwhelming majority of mine are silent.
>what a person who is normally a
>decent person but had a bad posting day (or whatever would do.)
Since I primarily killfile for bad netiquette (not bad Perl), they
won't have to worry about it unless they had a "bad manners day" :-)
>Personally I think it would baother me a lot if I was KF'ed as I try
>not to ask too may *bad* questions.
The only bad Perl questions are Perl questions whose answer is
easily found on your own hard disk.
(I give careful consideration to that "easily found" part. If the
doc's answer is hard to find, no killfiling. I don't expect that
posters will "find", only that they have "looked".
)
If you don't find the answer there, post away!
>I have found www sites to be
>*easier* on *bad* questions,
That is half of the equation.
How do the _answers_ there compare?
>ut I like it here.
Why? Do you get better answers here?
>I don't even mind
>most of the yelling.
Keeping in mind that the yelling is a symptom.
Posting without checking the docs is the disease.
That is, the "yelling" is a reaction, not the cause.
So, you should have said:
I don't even mind most of the off-topic postings and the
followups that they generate.
:-)
><shrug>I was asking as *sort of* a public service.</shrug>
To answer your question (how do you get out of killfiles):
You don't. (my opinion only, of course)
Once you've been rude, you are not going to get a second chance.
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: 05 Jun 2001 22:50:11 GMT
From: dave@sydney.daveb.net (Dave Bailey)
Subject: Re: OT :: What to do if you've been kill filed
Message-Id: <slrn9hqebc.f7r.dave@sydney.daveb.net>
On Tue, 5 Jun 2001 16:30:39 -0400, Tad McClellan <tadmc@augustmail.com> wrote:
>To answer your question (how do you get out of killfiles):
>
> You don't. (my opinion only, of course)
>
>Once you've been rude, you are not going to get a second chance.
*metaplonk*
--
Dave Bailey
davidb54@yahoo.com
------------------------------
Date: Wed, 6 Jun 2001 02:40:15 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: OT :: What to do if you've been kill filed
Message-Id: <Pine.LNX.4.30.0106060227230.2213-100000@lxplus003.cern.ch>
On Tue, 5 Jun 2001, Tad McClellan wrote:
> I expect that the total kills are an order of magnitude greater than
> the number of public kills. The overwhelming majority of mine are silent.
I guess so. Anyway, the community doesn't consist of just one or two
experts; so if one of them has an off-day, there will be others to
fill in the gap, I reckon... (well I hope so, because it's nothing
new for me to tread on a few toes in the pursuit...).
[...]
> >I have found www sites to be
> >*easier* on *bad* questions,
>
> That is half of the equation.
>
> How do the _answers_ there compare?
good point! Given a choice between the right answer with a sneer, or
some snake oil with a friendly gesture, I know which I would prefer.
Ideally, sure, I'd like the right answer and a friendly gesture, but I
know which one I'm willing to dispense with first.
[more good points elided...]
> To answer your question (how do you get out of killfiles):
>
> You don't. (my opinion only, of course)
Oh, I recycle my old killfile rules every month or two; but I have a
special killfile for the select few. Hardly any of them went straight
there, but after a couple of re-exposures in the monthly clean-out,
they left me little alternative. But then, in spite of some
commentators evidently considering me a geriatric, I reckon I'm still
learning.
all the best
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>
Administrivia:
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V10 Issue 1067
***************************************