[25513] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 7757 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Feb 8 21:05:19 2005

Date: Tue, 8 Feb 2005 18:05:09 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Tue, 8 Feb 2005     Volume: 10 Number: 7757

Today's topics:
        all_sequences.pl (Was: Perl - permute?) <socyl@987jk.com.invalid>
        Dynamically Generating A Format <michael+gnus@trollope.org>
    Re: Dynamically Generating A Format <skuo@mtwhitney.nsc.com>
    Re: Dynamically Generating A Format <michael+gnus@trollope.org>
    Re: FAQ 6.10 How do I use a regular expression to strip <matternc@comcast.net>
    Re: FAQ 6.10 How do I use a regular expression to strip <shawn.corey@sympatico.ca>
    Re: FAQ 6.10 How do I use a regular expression to strip <shawn.corey@sympatico.ca>
    Re: fields pragma (Anno Siegel)
    Re: Getting a hash into a savable format (Anno Siegel)
    Re: Getting a hash into a savable format <shawn.corey@sympatico.ca>
    Re: Getting a hash into a savable format <noreply@gunnar.cc>
        How to display the each executed line of a shell script (Matt Benson)
    Re: Net::SSH::Perl sending output to STDOUT <news@chaos-net.de>
    Re: Now what am I doing wrong <tadmc@augustmail.com>
    Re: Now what am I doing wrong catcher39@www.com
    Re: Now what am I doing wrong catcher39@www.com
    Re: Now what am I doing wrong <matternc@comcast.net>
    Re: Now what am I doing wrong <1usa@llenroc.ude.invalid>
    Re: one more IP addr regexp <No_4@dsl.pipex.com>
    Re: one more IP addr regexp <news@chaos-net.de>
    Re: one more IP addr regexp <matternc@comcast.net>
    Re: Perl - permute? <postmaster@castleamber.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Wed, 9 Feb 2005 01:20:46 +0000 (UTC)
From: kj <socyl@987jk.com.invalid>
Subject: all_sequences.pl (Was: Perl - permute?)
Message-Id: <cubohd$p22$1@reader2.panix.com>


In <1107709033.0d15271ffc45f8463e1fcde7dddd2c79@bubbanews> Ej <justsurge@mailcan.com> writes:

>Hi,
>How can I take an array (a,b,c,d,e) and list ALL possible [3 LETTER] combos 
>of these letters, I want the output to look like

>abc
>acb
>aab
>aaa

Iterative or recursive, take your pick.

sub all_sequences {
  my ($alphabet, $n) = @_;
  return []   unless @$alphabet;
  return [''] unless $n;

  my @words = @$alphabet;

  for (2..$n) {
    for my $i (reverse 0..$#words) {
      my $word = $words[$i];
      splice @words, $i, 1, map "${word}$_", @$alphabet;
    }
  }

  return \@words;
}

sub all_sequences_recursive {
  my ($alphabet, $n) = @_;
  return []   unless @$alphabet;
  return [''] unless $n;
  return
    [ map { my $word = $_; map "${word}$_", @$alphabet }
      @{all_sequences_recursive($alphabet, $n-1)} ]
}

__END__

  DB<1> x all_sequences_recursive([ qw(a b c d e) ], 3);
0  ARRAY(0x23dae4)
   0  'aaa'
   1  'aab'
   2  'aac'

 ...

   122  'eec'
   123  'eed'
   124  'eee'
-- 
NOTE: In my address everything before the first period is backwards;
and the last period, and everything after it, should be discarded.


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

Date: 08 Feb 2005 18:33:45 -0500
From: Michael Powe <michael+gnus@trollope.org>
Subject: Dynamically Generating A Format
Message-Id: <ubrau4ofa.fsf@trollope.org>

Hello,

I have a string of data to write out in a perl "format".  This string
may contain from 1 to several fields, delimited by commas.
Essentially, I would like to have the equivalent of this:

^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$filter
^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$filter

I would like to create the format dynamically, according to the number
of fields in my original string.

I tried this:

  format ALL_FILTERS =
@<<<<<<<<<<<     @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$key,            $profile_names{$key}
Filters:
^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
{
  my $format = '$filter' . "\n";
  while (my $filter = shift @filters) {
    $format .= '^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<' . "\n";
    $format .= '$filter' . "\n";
  }
  eval($format);
}
 .

No joy.  The idea was to get the number of picture lines and matching
variables according to the number of elements in the array.

This basically does diddly, everything goes into the existing picture
line. 

Any help would be much appreciated.  I know these formats don't seem
to get much conversation, but they're useful to me.

Thanks.

mp

-- 
'cat' is not recognized as an internal or external command,
operable program or batch file.


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

Date: Tue, 8 Feb 2005 16:31:01 -0800
From: Steven Kuo <skuo@mtwhitney.nsc.com>
Subject: Re: Dynamically Generating A Format
Message-Id: <Pine.GSO.4.21.0502081625490.9899-100000@mtwhitney.nsc.com>

On 8 Feb 2005, Michael Powe wrote:

(snipped)

> I would like to create the format dynamically, according to the number
> of fields in my original string.
> 
> I tried this:
> 
>   format ALL_FILTERS =
> @<<<<<<<<<<<     @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
> $key,            $profile_names{$key}
> Filters:
> ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
> {
>   my $format = '$filter' . "\n";
>   while (my $filter = shift @filters) {
>     $format .= '^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<' . "\n";
>     $format .= '$filter' . "\n";
>   }
>   eval($format);
> }
> .
> 
> No joy.  The idea was to get the number of picture lines and matching
> variables according to the number of elements in the array.
> 
> This basically does diddly, everything goes into the existing picture
> line. 
> 
> Any help would be much appreciated.  I know these formats don't seem
> to get much conversation, but they're useful to me.
> 
> Thanks.
> 
> mp



You may be better off using one of the template modules from CPAN.
Regardless, one solution is mentioned in the 'perlform'
documentation (see also 'perlvar' for $^A).


sub setform
{
    my $format = shift;
    sub {
        $^A = '';
        formline($format, @_);
	$^A;
    }
}

my $header =
    setform('@<<<<<<<<<<< @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<' . "\n"); 

my $filter_format = 
    setform('^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<' . "\n");

my @filters = qw(foo bar baz);

my %profile_names = (
    hello => 'world',
);

my $key = 'hello';

print $header->($key, $profile_names{$key});
print "Filters\n";
for (@filters)
{
    print $filter_format->($_);
}

-- 
Hope this helps,
Steven



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

Date: 08 Feb 2005 20:10:47 -0500
From: Michael Powe <michael+gnus@trollope.org>
Subject: Re: Dynamically Generating A Format
Message-Id: <u1xbq4jxk.fsf@trollope.org>

>>>>> "Steven" == Steven Kuo <skuo@mtwhitney.nsc.com> writes:

    Steven> On 8 Feb 2005, Michael Powe wrote: (snipped)

    >> I would like to create the format dynamically, according to the
    >> number of fields in my original string.
    >> 
    >> I tried this:
    >> 
    >> format ALL_FILTERS = @<<<<<<<<<<<
    >> @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< $key,
    >> $profile_names{$key} Filters:
    >> ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< { my $format = '$filter'
    >> . "\n"; while (my $filter = shift @filters) { $format .=
    >> '^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<' . "\n"; $format .=
    >> '$filter' . "\n"; } eval($format); } .
    >> 
    >> No joy.  The idea was to get the number of picture lines and
    >> matching variables according to the number of elements in the
    >> array.
    >> 
    >> This basically does diddly, everything goes into the existing
    >> picture line.
    >> 
    >> Any help would be much appreciated.  I know these formats don't
    >> seem to get much conversation, but they're useful to me.
    >> 
    >> Thanks.
    >> 
    >> mp



    Steven> You may be better off using one of the template modules
    Steven> from CPAN.  Regardless, one solution is mentioned in the
    Steven> 'perlform' documentation (see also 'perlvar' for $^A).

Any suggestions?  

    Steven> sub setform { my $format = shift; sub { $^A = '';
    Steven> formline($format, @_); $^A; } }

    Steven> my $header = setform('@<<<<<<<<<<<
    Steven> @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<' . "\n");

    Steven> my $filter_format =
    Steven> setform('^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<'
    Steven> . "\n");

    Steven> my @filters = qw(foo bar baz);

    Steven> my %profile_names = ( hello => 'world', );

    Steven> my $key = 'hello';

    Steven> print $header->($key, $profile_names{$key}); print
    Steven> "Filters\n"; for (@filters) { print $filter_format->($_);
    Steven> }

    Steven> -- Hope this helps, Steven

Thanks much.  I passed by that 'swrite' example in the docs because I
didn't get what it was doing.  (The perlform is where I picked up that
'eval' business.)

I will work with this example, it makes sense to me.

Thanks again.

mp

-- 
'cat' is not recognized as an internal or external command,
operable program or batch file.


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

Date: Tue, 08 Feb 2005 18:42:24 -0500
From: Chris Mattern <matternc@comcast.net>
Subject: Re: FAQ 6.10 How do I use a regular expression to strip C style comments from a file?
Message-Id: <2fadncBYQ-r805TfRVn-3Q@comcast.com>

Shawn Corey wrote:

> Why do I care about C-style comments in Perl?
> 
Because you may be using Perl to automate processing of C source
files; in fact that sort of thing is one of the things Perl is
very good at.

-- 
             Christopher Mattern

"Which one you figure tracked us?"
"The ugly one, sir."
"...Could you be more specific?"


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

Date: Tue, 08 Feb 2005 18:14:18 -0500
From: Shawn Corey <shawn.corey@sympatico.ca>
Subject: Re: FAQ 6.10 How do I use a regular expression to strip C style comments from a file?
Message-Id: <aJbOd.3271$504.452942@news20.bellglobal.com>

Why do I care about C-style comments in Perl?

    --- Shawn


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

Date: Tue, 08 Feb 2005 20:38:17 -0500
From: Shawn Corey <shawn.corey@sympatico.ca>
Subject: Re: FAQ 6.10 How do I use a regular expression to strip C style comments from a file?
Message-Id: <9QdOd.3335$504.477102@news20.bellglobal.com>

Chris Mattern wrote:
> Because you may be using Perl to automate processing of C source
> files; in fact that sort of thing is one of the things Perl is
> very good at.
> 
So, why won't I be using a C parser, or at least, lexx and yacc? Perl is 
not good at parsing, it's good at find patterns. Even the modules at 
CPAN don't compare to a good lexx/yacc parser.

    --- Shawn


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

Date: 8 Feb 2005 23:24:09 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: fields pragma
Message-Id: <cubhmp$i1o$1@mamenchi.zrz.TU-Berlin.DE>

Lee Goddard <leegee@gmail.com> wrote in comp.lang.perl.misc:
> Is it possible to use the fields pragma to specify the type of each
> object member/field?

What does the documentation say?  "perldoc fields".

I'm not sure what you mean with "type of field".  Do you want to distinguish
strings, integers, floats?  Or want to allow only certain kinds of refs
(hash, array, code)?  Or only objects of certain classes?  Something else?

> If not, is there a modulelist module which allows this to be done?

Define "this".  If with "types" you mean numeric types, check out PDL.

Anno


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

Date: 8 Feb 2005 23:05:39 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Getting a hash into a savable format
Message-Id: <cubgk3$ho6$1@mamenchi.zrz.TU-Berlin.DE>

YYUsenet  <yyusenet@yahoo.com> wrote in comp.lang.perl.misc:
> I am rather new to Perl, so this may be a very easy to answer question. 
>   I looked through the FAQ <perldoc -q hash> but it didn't give a direct 
> way to do it.  Under the section "How do I process an entire hash?" it 
> gave a way to go through the whole hash, which I could save each thing 
> individually (maybe comma delimited).  But this seems to me to be a very 
> unefficiant way to do it.  I was wondering if there was a way to get it 
> saved to a file.  Trying "print %hash" gives me everything in the hash 
> all bundled together, which I don't think will work.  Any help will be 
> greatly appreciated.

perldoc Data::Dumper
perldoc Storable
see also FreezeThaw on CPAN

Anno


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

Date: Tue, 08 Feb 2005 18:12:56 -0500
From: Shawn Corey <shawn.corey@sympatico.ca>
Subject: Re: Getting a hash into a savable format
Message-Id: <UHbOd.3270$504.452474@news20.bellglobal.com>

YYUsenet wrote:
> I am rather new to Perl, so this may be a very easy to answer question. 
>  I looked through the FAQ <perldoc -q hash> but it didn't give a direct 
> way to do it.  Under the section "How do I process an entire hash?" it 
> gave a way to go through the whole hash, which I could save each thing 
> individually (maybe comma delimited).  But this seems to me to be a very 
> unefficiant way to do it.  I was wondering if there was a way to get it 
> saved to a file.  Trying "print %hash" gives me everything in the hash 
> all bundled together, which I don't think will work.  Any help will be 
> greatly appreciated.
> 
> Thanks,
> YYusenet

perldoc Data::Dumper

Printing to a file handle FH:
print FH Dumper( \%my_hash );

    --- Shawn


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

Date: Wed, 09 Feb 2005 00:36:11 +0100
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: Getting a hash into a savable format
Message-Id: <36t0ooF54dmkoU1@individual.net>

YYUsenet wrote:
> I am rather new to Perl, so this may be a very easy to answer question. 
>  I looked through the FAQ <perldoc -q hash> but it didn't give a direct 
> way to do it.  Under the section "How do I process an entire hash?" it 
> gave a way to go through the whole hash, which I could save each thing 
> individually (maybe comma delimited).  But this seems to me to be a very 
> unefficiant way to do it.  I was wondering if there was a way to get it 
> saved to a file.  Trying "print %hash" gives me everything in the hash 
> all bundled together, which I don't think will work.  Any help will be 
> greatly appreciated.

As long as we not talking about a complex data structure, but just a 
plain hash, one nice alternative to the tips Anno gave you is to save it 
as a DBM file. For instance:

     use SDBM_File;
     use Fcntl;

     # Get saved hash or create a new
     tie my %hash, 'SDBM_File', 'myhash', O_RDWR|O_CREAT, 0644 or die $!;
     # Do whatever you like with it
     untie %hash;
     # The altered hash saved

See "perldoc AnyDBM_File" for an overview.

-- 
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl


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

Date: Wed, 9 Feb 2005 01:05:20 +0100
From: mbens@hotmail.com (Matt Benson)
Subject: How to display the each executed line of a shell script?
Message-Id: <cubk3v$nbi$04$1@news.t-online.com>

When I start (in ksh) a shell script test.sh
How do I let the shell interpreter display each line he will execute
just before he is really executing it.
The display should include the real content of variables.

Matt



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

Date: Wed, 9 Feb 2005 00:54:12 +0100
From: Martin Kissner <news@chaos-net.de>
Subject: Re: Net::SSH::Perl sending output to STDOUT
Message-Id: <slrnd0ik94.kec.news@maki.homeunix.net>

ryanmhuc@yahoo.com wrote :
> Thanks for the script but it does the same thing.

What same thing?

>                                                   If the password is
> incorrect for the login i get:
> "Permission denied at test.pl line 43"
> and then it stops the program.

What do you expect? If the pw is incorrect you should't be able to log
in, should you?

>                                The issue is I need to catch this. The
> script I'm trying to create logins into about 16 different servers.
> These servers passwords are not supposed to change but every once in a
> while one does. I want the program to not die when it can't login to
> the server but instead trap it, let me know and then continue with the
> script.

Then you should probably check for success.
if (your command) {
	do stuff;
}
else {
	do other stuff;
}

btw:
You'd probably increase your chances of getting qualified help by
avoiding TOFU quoting an providing some code example.

HTH
Martin

[ TOFU snipped ]

-- 
perl -e 'print 7.74.117.115.116.11.32.13.97.110.111.116.104.101.114.11
 .32.13.112.101.114.108.11.32.13.104.97.99.107.101.114.10.7'


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

Date: Tue, 8 Feb 2005 15:30:53 -0600
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: Now what am I doing wrong
Message-Id: <slrnd0ibsd.1k5.tadmc@magna.augustmail.com>

catcher39@www.com <catcher39@www.com> wrote:

> previous comments made on this thread ("need assistance with an
                         ^^^^^^^^^^^^^^
> inherited script that process email")


That is not _this_ thread.

That is some other non-related thread.


(threads are defined by the References: header)

-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


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

Date: 8 Feb 2005 16:55:13 -0800
From: catcher39@www.com
Subject: Re: Now what am I doing wrong
Message-Id: <1107910513.262301.272200@l41g2000cwc.googlegroups.com>


Tad McClellan wrote:
> catcher39@www.com <catcher39@www.com> wrote:
>
> > previous comments made on this thread ("need assistance with an
>                          ^^^^^^^^^^^^^^
> > inherited script that process email")
>
>
> That is not _this_ thread.
>
> That is some other non-related thread.
>
>
> (threads are defined by the References: header)
>
> --
>     Tad McClellan                          SGML consulting
>     tadmc@augustmail.com                   Perl programming
>     Fort Worth, Texas

Tell that to GOOGLE



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

Date: 8 Feb 2005 16:59:36 -0800
From: catcher39@www.com
Subject: Re: Now what am I doing wrong
Message-Id: <1107910775.996178.18300@f14g2000cwb.googlegroups.com>


Tad McClellan wrote:
> catcher39@www.com <catcher39@www.com> wrote:
>
> > Subject: Now what am I doing wrong
>
>
> Please put the subject of your article in the Subject of your
article!
>
>

What are you talking about ? Not everybody is as rich as you are and
can afford a dedicated USENET newsgroup reader. For those of us using
Google there is no other way of doing a post. So lump it.


> > I realize it must be obvious
>
>
> So obvious that a *machine* can find the problem.
>
> It is demeaning to be asked to do the work of a machine,
> please don't do that to us.
>

Oh , sorry Mr AllMighty and Powerful and Obnoxious McClellan. I am
sorry that you had to take out 3 minutes from your ultra special and
expensive time to rant at someone who had already been helped by people
who were obviously several stations below you in life.


>
> >     if($attaches=1)
>
>
> You should always enable warnings when developing Perl code!
>
>
> --
>     Tad McClellan                          SGML consulting
>     tadmc@augustmail.com                   Perl programming
>     Fort Worth, Texas



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

Date: Tue, 08 Feb 2005 20:50:07 -0500
From: Chris Mattern <matternc@comcast.net>
Subject: Re: Now what am I doing wrong
Message-Id: <M5adnUdUXfvO8ZTfRVn-rw@comcast.com>

catcher39@www.com wrote:

> 
> Tad McClellan wrote:
>> catcher39@www.com <catcher39@www.com> wrote:
>>
>> > Subject: Now what am I doing wrong
>>
>>
>> Please put the subject of your article in the Subject of your
> article!
>>
>>
> 
> What are you talking about ? Not everybody is as rich as you are and
> can afford a dedicated USENET newsgroup reader. For those of us using
> Google there is no other way of doing a post. So lump it.

Are you saying that Google forces you to use uninformative subject lines?
Somehow, I really doubt that.


-- 
             Christopher Mattern

"Which one you figure tracked us?"
"The ugly one, sir."
"...Could you be more specific?"


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

Date: Wed, 09 Feb 2005 01:55:46 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: Now what am I doing wrong
Message-Id: <Xns95F7D4F39A63Dasu1cornelledu@127.0.0.1>

Chris Mattern <matternc@comcast.net> wrote in
news:M5adnUdUXfvO8ZTfRVn-rw@comcast.com: 

> catcher39@www.com wrote:
> 
>> 
>> Tad McClellan wrote:
>>> catcher39@www.com <catcher39@www.com> wrote:
>>>
>>> > Subject: Now what am I doing wrong
>>>
>>>
>>> Please put the subject of your article in the Subject of your
>> article!
>>>
>>>
>> 
>> What are you talking about ? Not everybody is as rich as you are and
>> can afford a dedicated USENET newsgroup reader. For those of us using
>> Google there is no other way of doing a post. So lump it.
> 
> Are you saying that Google forces you to use uninformative subject
> lines? Somehow, I really doubt that.

I think the more fundamental question is "what does being rich have to
do with using a dedicated newsreader?" 

But then, what do I know.

Sinan.


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

Date: Wed, 09 Feb 2005 00:57:40 +0000
From: Big and Blue <No_4@dsl.pipex.com>
Subject: Re: one more IP addr regexp
Message-Id: <ceqdnbnKkNeb_ZTfRVnysg@pipex.net>

>Would be useful if it matched valid IP addresses.

    572662306 is a valid IP address.

    As is 04210421042.

    And 0x22222222.

    And 34.34.8738  (I could go on...)

    Try telnet'ing to them.  You'll see they all (try to) connect to 
34.34.34.34.

    If you are trying to match dotted-quad addresses fine, but don't think 
that corresponds to all "IP addresses".




-- 
              Just because I've written it doesn't mean that
                   either you or I have to believe it.


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

Date: Wed, 9 Feb 2005 02:21:25 +0100
From: Martin Kissner <news@chaos-net.de>
Subject: Re: one more IP addr regexp
Message-Id: <slrnd0ipcl.kec.news@maki.homeunix.net>

Big and Blue wrote :
>>Would be useful if it matched valid IP addresses.
>
>     572662306 is a valid IP address.
>
>     As is 04210421042.
>
>     And 0x22222222.
>
>     And 34.34.8738  (I could go on...)
>
>     Try telnet'ing to them.  You'll see they all (try to) connect to 
> 34.34.34.34.

Hm. Are you sure?

% telnet 572662306  
572662306: No address associated with nodename
% telnet 04210421042.
04210421042.: No address associated with nodename
% telnet 0x22222222.
0x22222222.: No address associated with nodename
% telnet 0x22222222
0x22222222: No address associated with nodename
% telnet 34.34.8738
34.34.8738: No address associated with nodename

Doesn't work on my host.

Regards
Martin

-- 
perl -e 'print 7.74.117.115.116.11.32.13.97.110.111.116.104.101.114.11
 .32.13.112.101.114.108.11.32.13.104.97.99.107.101.114.10.7'


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

Date: Tue, 08 Feb 2005 20:48:45 -0500
From: Chris Mattern <matternc@comcast.net>
Subject: Re: one more IP addr regexp
Message-Id: <M5adnURUXfud8ZTfRVn-rw@comcast.com>

Martin Kissner wrote:

> Big and Blue wrote :
>>>Would be useful if it matched valid IP addresses.
>>
>>     572662306 is a valid IP address.
>>
>>     As is 04210421042.
>>
>>     And 0x22222222.
>>
>>     And 34.34.8738  (I could go on...)
>>
>>     Try telnet'ing to them.  You'll see they all (try to) connect to
>> 34.34.34.34.
> 
> Hm. Are you sure?
> 
> % telnet 572662306
> 572662306: No address associated with nodename
> % telnet 04210421042.
> 04210421042.: No address associated with nodename
> % telnet 0x22222222.
> 0x22222222.: No address associated with nodename
> % telnet 0x22222222
> 0x22222222: No address associated with nodename
> % telnet 34.34.8738
> 34.34.8738: No address associated with nodename
> 
Does depend on your telnet client.  My Linux system gave me this:

syscjm@ayato:~$ telnet 572662306
telnet: could not resolve 572662306/telnet: Name or service not known
syscjm@ayato:~$ telnet 04210421042
telnet: could not resolve 04210421042/telnet: Name or service not known
syscjm@ayato:~$ telnet 0x22222222
telnet: could not resolve 0x22222222/telnet: Name or service not known
syscjm@ayato:~$ telnet 34.34.8738
telnet: could not resolve 34.34.8738/telnet: Name or service not known

But my Solaris system gave me this:

$ telnet 572662306
Trying 34.34.34.34...
^C$ telnet 04210421042
Trying 34.34.34.34...
^C$ telnet 0x22222222
Trying 34.34.34.34...
^C$ telnet 34.34.8738
Trying 34.34.34.34...

And an AIX system gave me this:

$ telnet 572662306
Trying...
$ telnet 04210421042
Trying...
$ telnet 0x22222222
Trying...
$ telnet 34.34.8738
Trying...

(not as informative, but it pretty much has to be trying 34.34.34.34)

-- 
             Christopher Mattern

"Which one you figure tracked us?"
"The ugly one, sir."
"...Could you be more specific?"


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

Date: 8 Feb 2005 23:32:06 GMT
From: John Bokma <postmaster@castleamber.com>
Subject: Re: Perl - permute?
Message-Id: <Xns95F7B25F75688castleamber@130.133.1.4>

A. Sinan Unur wrote:

> John Bokma <postmaster@castleamber.com> wrote in 

[ snip ]

>> Ah, personally I consider it nicer. On the other hand, you risk
>> people calling you at home.
> 
> I instinctively take people who post under their real names more
> seriously than others. There are exceptions to this but so far it's
> been a useful rule for me.

I prefer to use my real name. The most annoying thing are people who 
morph. And really weird are people who in a flame war change their name 
and start agreeing with the post made by their previous identity.

But how do you know someone is real? One year and a half some of my 
online friends were talking to someone. He used a name that sounded 
real, and some stuff he told (or she) were true (like the country etc.).

But... this person was giving to people pictures he claimed to be 
showing him, but this was not true. When a close friend showed me a 
picture I thought: well, this is a bit too good for just a snapshot (it 
looked too professional). Moreover, I found somewhere pictures "he" had 
given to me once, showing a completly different guy.

A lot of Googling later it turned out that he used pics he found online. 
Yes he renamed them, but forgot 1.

> As for someone calling me at home, the closest I ever came to
> something like that happening in the last decade or so was actually
> here a few weeks ago when a certain someone expressed his desire to
> "reach out and touch me". I am going to be an optimist an assume that
> the reason he has not been back since that posting is due to the fact
> that AT&T is a diligent ISP :)

:-D. I was called a few years ago by someone who was not happy with 
something I wrote. We talked a bit, and he apologised for calling me in 
the first place (even agreed with me :-) ). But yes, things like that 
are scary (at least to me).

If I don't like a posting, I just stop replying. In rare cases I 
unsubscribe from the group. I never liked the idea of kill files, except 
for things that are clearly spam. Often if someone pisses me off its 
limited to one thread. I try to give every thread a score of 0 :-D

So far it has been working fine for me :-D

-- 
John                   Small Perl scripts: http://johnbokma.com/perl/
               Perl programmer available:     http://castleamber.com/
            Happy Customers: http://castleamber.com/testimonials.html
                        


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

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>


Administrivia:

#The Perl-Users Digest is a retransmission of the USENET newsgroup
#comp.lang.perl.misc.  For subscription or unsubscription requests, send
#the single line:
#
#	subscribe perl-users
#or:
#	unsubscribe perl-users
#
#to almanac@ruby.oce.orst.edu.  

NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice. 

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

#To request back copies (available for a week or so), send your request
#to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
#where x is the volume number and y is the issue number.

#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V10 Issue 7757
***************************************


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