[29808] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1051 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Nov 22 21:09:41 2007

Date: Thu, 22 Nov 2007 18:09:07 -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           Thu, 22 Nov 2007     Volume: 11 Number: 1051

Today's topics:
    Re: A little help on perl coding.. clearguy02@yahoo.com
    Re: A little help on perl hashes.. clearguy02@yahoo.com
    Re: A little help on perl hashes.. <ben@morrow.me.uk>
    Re: A little help on perl hashes.. clearguy02@yahoo.com
    Re: Calling a SQL Server Stored Procedure from within P <jurgenex@hotmail.com>
        How to clean up this ugly code? <blaine@worldweb.com>
    Re: How to clean up this ugly code? <joost@zeekat.nl>
        How to get the string Cartesian Products of 2 list xueweizhong@gmail.com
    Re: interesting case of data corruption, and its cause <uri@stemsystems.com>
    Re: interesting case of data corruption, and its cause xhoster@gmail.com
    Re: interesting case of data corruption, and its cause <rvtol+news@isolution.nl>
    Re: interesting case of data corruption, and its cause <rvtol+news@isolution.nl>
    Re: interesting case of data corruption, and its cause <bik.mido@tiscalinet.it>
    Re: is this expected behavior? perl '' test.pl wilburlo@gmail.com
        Perl wont install <leonard_plummer@hotmail.co.uk>
    Re: Perl wont install <joost@zeekat.nl>
    Re: POSIX signal handling: inputs needed <rsarpi@gmail.com>
    Re: Regular expression help <tadmc@seesig.invalid>
    Re: Script to disconnect Linksys WRT54G wireless router <davewilson69@sbcglobal.net>
    Re: Script to disconnect Linksys WRT54G wireless router <davewilson69@sbcglobal.net>
    Re: Why this file download CGI works with Firefox and f <us@invalid.org>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Thu, 22 Nov 2007 10:38:18 -0800 (PST)
From: clearguy02@yahoo.com
Subject: Re: A little help on perl coding..
Message-Id: <80638730-27e7-4673-acef-1678af70c0ce@s19g2000prg.googlegroups.com>

On Nov 21, 1:54 pm, Jim Gibson <jimsgib...@gmail.com> wrote:
> In article
> <04ee98b1-2fb6-4ceb-a3e8-3f6168931...@w34g2000hsg.googlegroups.com>,
>
>
>
> <cleargu...@yahoo.com> wrote:
> > Hi folks,
>
> > I am playing around on the below issue. I have a file, C:\test.txt
> > with the following content:
>
> > -------------------------------------------------------------------------------
> > -------------------------------
> > user id       name       email                            employee
> > uid           manager uid
>
> > jcarter        john        jacar...@gmail.com        00206251
> > 00207609
> > mstella      mary       mste...@yahoo.com       00207609    00220458
> > msmith      martin     msm...@gmail.com        00202227   00207609
> > bborders     bob        bbord...@gmail.com      00220458    00202003
> > swatson     sush       swat...@yahoo.com     00224981   00207609
> > rcasey        rick        rca...@gmail.com
> > 00202003               00201009
>
> > -------------------------------------------------------------------------------
> > ---------------------------------
>
> > mstella is the boss of jcarter, msmith and swatson;
> > bborders  is the boss  of mstella;
> > rcasey is the boss of bborders;
>
> > Now I need to replace the manager uid's with the boss id's; for the
> > top-most manager's id, you can replace his manager uid with his user
> > id itself (in this case rcasey is the top-most guy).
>
> > i.e the output file should be as follows:
>
> > -------------------------------------------------------------------------------
> > --
> > user id       name       email                            manager id
>
> > jcarter        john        jacar...@gmail.com        mstella
> > mstella      mary       mste...@yahoo.com        bborders
> > msmith      martin     msm...@gmail.com         mstella
> > bborders     bob        bbord...@gmail.com       rcasey
> > swatson     sush       swat...@yahoo.com       mstella
> > rcasey       rick         rca...@gmail.com          rcasey
>
> > -------------------------------------------------------------------------------
> > -
>
> > I am struggling to figure it out with hashes and arrays, but not
> > getting a desired result.. can some one help me out here?
>
> I would use a hash-of-hashes. The key for the primary hash would be the
> employee uid, which should always be unique. Each employee will have a
> primary hash entry, with the uid as key and a reference to a secondary
> hash as value. Each secondary hash will have entries with keys
> 'user_id', 'manager_uid', etc. Note that you can include the
> 'employee_uid' as a secondary hash entry or not, because the value is
> already the primary hash key.
>
> Your problem them becomes iterating through the primary hash, fetching
> the manager uid value from the secondary hash, looking up the 'user id'
> field from the manager's hash found by using the manager uid as key,
> and adding the value of the manager's user id field to each employee's
> secondary hash. Note that I would use a new field for manager id and
> not overwrite the existing mananger uid field.
>
> Something like the following, assuming that all of the employee data
> has been stored in the primary hash %employees (untested):
>
>   for my $euid ( keys %employees ) {
>     my $manager_uid = $employees{$euid}->{manager_uid};
>     my $manager_id = $employees{$manager_uid}->{user_id};
>     $employees{$euid}->{manager_id} = $manager_id;
>   }
>
> Then you can print out the fields for each employee as you wish.
>
> Good luck!
>
> --
> Jim Gibson
>
>  Posted Via Usenet.com Premium Usenet Newsgroup Services
> ----------------------------------------------------------
>     ** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
> ----------------------------------------------------------
>                http://www.usenet.com

Hi Jim,

The following piece is not working.


%users;

while (<DATA>)
{
  chop;
  ($nt_id, $name, $uid, $mid) = split(/\s+/);

  $users{$nt_id} = [$name, $uid, $mid];
 }

close(DATA);


 for $uid (keys %users)
  {
    $mid = $users{$uid}->{mid};
    $manager_id = $users{$mid}->{$nt_id};
    $users{$uid}->{mid} = $manager_id;

    print "$nt_id\t\t$manager_id\n";
  }



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

Date: Thu, 22 Nov 2007 14:30:54 -0800 (PST)
From: clearguy02@yahoo.com
Subject: Re: A little help on perl hashes..
Message-Id: <9a91e98f-1fba-4c5e-a24d-5edf9cfca346@s6g2000prc.googlegroups.com>

On Nov 22, 8:00 am, cleargu...@yahoo.com wrote:
> On Nov 22, 7:22 am, Q...@domain.invalid wrote:
>
>
>
>
>
> > cleargu...@yahoo.com wrote in message-id:  <8186189c-6041-4f47-8656-b58b20886...@s36g2000prg.googlegroups.com>
>
> > > On Nov 22, 5:04 am, Sherman Pendley <spamt...@dot-app.org> wrote:
> > > > cleargu...@yahoo.com writes:
> > > > > Can some one take a look at it? :)
>
> > > > After you've posted "it" three times?
>
> > > > Um... no. Learn some manners and maybe I'll help next time.
>
> > > > sherm--
>
> > > > --
> > > > WV News, Blogging, and Discussion:http://wv-www.com
> > > > Cocoa programming in Perl:http://camelbones.sourceforge.net
>
> > > I am storing the whole file into an array, @array. Then I am splititng
> > > each line in the array with split function and storing the each field
> > > as $array[0], $array[1], $array[2), and $array[3]; Then I am looping
> > > the file again to compare $array[3] and $array[0] and replace the
> > > $array[3] with with $array[0] appropriately.. now I am hitting a
> > > problem in thic comarison mechanism.. can some one help with me with a
> > > better algorithm/code?
>
> > > Thanks,
> > > JC
>
> > #You should probably do something while storing the file to the array.
> > while (<FILE1>) {
> >   my $line = $_;
>
> >   #Like splitting the line and storing its elements in an array
> >   my @lineArray = split (/\s+/, $line); #Or split as desired
>
> >   #Ok, replace the fourth item in the array with the first item
> >   #if some condition is true; elaborate more on what you need here.
> >   if ($lineArray[3] < $lineArray[0]) {
> >     $lineArray[3] = $lineArray[0];
> >   }
>
> > }- Hide quoted text -
>
> > - Show quoted text -- Hide quoted text -
>
> > - Show quoted text -
>
> Forgot to add my code:
> ====================================
> while (<DATA>)
> {
>    $line = $_;
>    @lineArray = split (/\s+/, $line);
>
>    if ($lineArray[3] == $lineArray[2])
>      {
>        s/$lineArray[3]/$lineArray[0]/g;
>      }
>     print "$lineArray[0]\t\t$lineArray[1]\t\t$lineArray[3]\n";}
>
> ==================================
>
> Can some one help me here?
>
> Thanks in advance,
> JC
>
>
>
> }- Hide quoted text -
>
> - Show quoted text -- Hide quoted text -
>
> - Show quoted text -

Hi all,

I am still looking our the help.. Can some kindly take a look at it?

Thanks,
JC



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

Date: Thu, 22 Nov 2007 22:55:02 +0000
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: A little help on perl hashes..
Message-Id: <6vdh15-ovm.ln1@osiris.mauzo.dyndns.org>


Quoth clearguy02@yahoo.com:
> On Nov 22, 8:00 am, cleargu...@yahoo.com wrote:
<snip>
> > > > On Nov 22, 5:04 am, Sherman Pendley <spamt...@dot-app.org> wrote:
> > > > > cleargu...@yahoo.com writes:
> > > > > > Can some one take a look at it? :)
> >
> > > > > After you've posted "it" three times?
> >
> > > > > Um... no. Learn some manners and maybe I'll help next time.
<snip>
> >
> > Can some one help me here?
> >
> > }- Hide quoted text -
> >
> > - Show quoted text -- Hide quoted text -
> >
> > - Show quoted text -
> 
> I am still looking our the help.. Can some kindly take a look at it?

Being a pain doesn't often lead to useful help on Usenet. Responding to
your own post after 12 hours simply to ask again and quoting Google's
rubbish both count as being a pain, especially when you've been warned
you're being rude.

Ben



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

Date: Thu, 22 Nov 2007 15:18:00 -0800 (PST)
From: clearguy02@yahoo.com
Subject: Re: A little help on perl hashes..
Message-Id: <0bb63b0e-b3a0-48bc-ad32-34aecb80516b@d27g2000prf.googlegroups.com>

On Nov 22, 2:55 pm, Ben Morrow <b...@morrow.me.uk> wrote:
> Quoth cleargu...@yahoo.com:
>
>
>
>
>
> > On Nov 22, 8:00 am, cleargu...@yahoo.com wrote:
> <snip>
> > > > > On Nov 22, 5:04 am, Sherman Pendley <spamt...@dot-app.org> wrote:
> > > > > > cleargu...@yahoo.com writes:
> > > > > > > Can some one take a look at it? :)
>
> > > > > > After you've posted "it" three times?
>
> > > > > > Um... no. Learn some manners and maybe I'll help next time.
> <snip>
>
> > > Can some one help me here?
>
> > > }- Hide quoted text -
>
> > > - Show quoted text -- Hide quoted text -
>
> > > - Show quoted text -
>
> > I am still looking our the help.. Can some kindly take a look at it?
>
> Being a pain doesn't often lead to useful help on Usenet. Responding to
> your own post after 12 hours simply to ask again and quoting Google's
> rubbish both count as being a pain, especially when you've been warned
> you're being rude.
>
> Ben- Hide quoted text -
>
> - Show quoted text -

Hi Ben,

When I was asked to post my code, I did it.. If you don't want to
help.. pl. kindly stay away. Pl. understand that I am stuck with an
issue and that I am not fooling around here. I have clearly told what
the issue is, what I have done and I am seeking out for some help
here.


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

Date: Thu, 22 Nov 2007 16:54:59 GMT
From: "Jürgen Exner" <jurgenex@hotmail.com>
Subject: Re: Calling a SQL Server Stored Procedure from within Perl
Message-Id: <Dvi1j.3120$7T.2578@trndny09>

ab wrote:
> PS. What does LOLROTFL, YMMD mean?

Laughing out lout, rolling on the floor laughing, you made my day.

jue 




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

Date: Thu, 22 Nov 2007 15:21:45 -0800 (PST)
From: "blaine@worldweb.com" <blaine@worldweb.com>
Subject: How to clean up this ugly code?
Message-Id: <f46bba73-0d4d-4abd-ac9d-22e3462fd181@s19g2000prg.googlegroups.com>

Hey,

I have this ugly code below that I would like to get rid of everything
in the switch statement. My preference would be to have something
simple that just takes and id and calls that sub routine number.

I suppose I could use and eval like
eval( "\$self->DisplayPage$subpage_id");

but was wondering if someone can think of something better, as then if
there is an error it's trapped in eval..

Code I'd like to clean is below...

    SWITCH: for ($subpage_id)
        {
        if    (/^1$/)  {$self->DisplayPage; last SWITCH;}
        elsif (/^2$/)  {$self->DisplayPage2; last SWITCH;}
        elsif (/^3$/)  {$self->DisplayPage3; last SWITCH;}
        elsif (/^4$/)  {$self->DisplayPage4; last SWITCH;}
        elsif (/^5$/)  {$self->DisplayPage5; last SWITCH;}
        elsif (/^6$/)  {$self->DisplayPage6; last SWITCH;}
        elsif (/^7$/)  {$self->DisplayPage7; last SWITCH;}
        elsif (/^8$/)  {$self->DisplayPage8; last SWITCH;}
        elsif (/^9$/)  {$self->DisplayPage9; last SWITCH;}
        }

Thanks,
Blaine


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

Date: 22 Nov 2007 23:56:15 GMT
From: Joost Diepenmaat <joost@zeekat.nl>
Subject: Re: How to clean up this ugly code?
Message-Id: <4746171f$0$23803$e4fe514c@dreader20.news.xs4all.nl>

my $method = "DisplayPage$subpage_id";
$self->$method;

is strict "clean" but you might want to check that $subpage_id is an int 
in the range you expect.

Joost.



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

Date: Thu, 22 Nov 2007 17:53:22 -0800 (PST)
From: xueweizhong@gmail.com
Subject: How to get the string Cartesian Products of 2 list
Message-Id: <3bc8b657-828f-4cde-bbf5-9d9c09b8e59f@s8g2000prg.googlegroups.com>

Give 2 string list such as: a..b and 1..3, i want to get a list which
is (a1, a2, a3, b1, b2, b3). Is there an elegant way in perl to
fullfill this withou using loop BLOCK? Or Is there a elegant one line
expression to get this?


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

Date: Thu, 22 Nov 2007 16:30:25 GMT
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: interesting case of data corruption, and its cause
Message-Id: <x7ejeis0ny.fsf@mail.sysarch.com>

>>>>> "b" == bugbear  <bugbear@trim_papermule.co.uk_trim> writes:

  b> Peter Makholm wrote:
  >> bugbear <bugbear@trim_papermule.co.uk_trim> writes:
  >> 
  >>> I wrote a subroutine, called (e.g.) "extract",
  >>> which takes a single src object, and returns a
  >>> new object.
  >> And obviously changes the source object in some way. So I guess that
  >> you
  >> extract function works on $_[0] and not starting with something like:
  >> sub extract {
  >> my $src = shift;

  b> actually:

  b> sub extract {
  b>      my ($src) = @_;

  b> It's the assignment/use of the (global) $_ many miles away
  b> (in code terms) that's (was) killing me.

append this to that code to protect $_:

	local( $_ ) ;

you now have copied $_ into $src and have a dynamic new $_ for the code
to be called.

this is also another reason not to use $_ unless you have to (map/grep,
etc.). in your i/o loops use lexical vars (never while(<FOO>) as it sets
$_).

	while( my $line = <FOO> ) {

or use file::slurp if the file size isn't humongous (which is < a few meg
these days).

uri

-- 
Uri Guttman  ------  uri@stemsystems.com  -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs  ----------------------------  http://jobs.perl.org


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

Date: 22 Nov 2007 19:16:18 GMT
From: xhoster@gmail.com
Subject: Re: interesting case of data corruption, and its cause
Message-Id: <20071122141620.404$6g@newsreader.com>

Peter Makholm <peter@makholm.net> wrote:
> bugbear <bugbear@trim_papermule.co.uk_trim> writes:
>
> > I wrote a subroutine, called (e.g.) "extract",
> > which takes a single src object, and returns a
> > new object.
>
> And obviously changes the source object in some way. So I guess that you
> extract function works on $_[0] and not starting with something like:
>
> sub extract {
>     my $src = shift;


That doesn't protect $_, that protects $_[0].

perl -le 'my @x=1..10; map {foo($_)} @x; sub foo {$_="a" if $_[0]==5}; \
          print "@x"'
1 2 3 4 a 6 7 8 9 10

No assignment to $_[0], yet still the thing was changed.

Xho

-- 
-------------------- http://NewsReader.Com/ --------------------
The costs of publication of this article were defrayed in part by the
payment of page charges. This article must therefore be hereby marked
advertisement in accordance with 18 U.S.C. Section 1734 solely to indicate
this fact.


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

Date: Thu, 22 Nov 2007 20:24:52 +0100
From: "Dr.Ruud" <rvtol+news@isolution.nl>
Subject: Re: interesting case of data corruption, and its cause
Message-Id: <fi4ol9.1bs.1@news.isolution.nl>

smallpond schreef:

> Assigning to $_ just changes the scalar global variable $_,
> not the thing that it refers to.

perl -wle '
    @x = 1..3;
    $_ = 42 for @x;
    print for @x
'
42
42
42

-- 
Affijn, Ruud

"Gewoon is een tijger."


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

Date: Thu, 22 Nov 2007 21:41:08 +0100
From: "Dr.Ruud" <rvtol+news@isolution.nl>
Subject: Re: interesting case of data corruption, and its cause
Message-Id: <fi4tkf.1i4.1@news.isolution.nl>

Dr.Ruud schreef:
> smallpond:

>> Assigning to $_ just changes the scalar global variable $_,
>> not the thing that it refers to.
> 
> perl -wle '
>     @x = 1..3;
>     $_ = 42 for @x;
>     print for @x
> '
> 42
> 42
> 42

Or maybe clearer:

[root@peat attachments]# perl -wle'
    $_ = "foo";
    print;

    @x = 1..3;
    print for @x;

    $_ = 42 for @x;
    print for @x;

    print;
'
foo
1
2
3
42
42
42
foo

-- 
Affijn, Ruud

"Gewoon is een tijger."


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

Date: Fri, 23 Nov 2007 01:04:38 +0100
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: interesting case of data corruption, and its cause
Message-Id: <a86ck3hleltf311g7l24tcusrdu7m7v7ef@4ax.com>

On Thu, 22 Nov 2007 16:30:25 GMT, Uri Guttman <uri@stemsystems.com>
wrote:

>this is also another reason not to use $_ unless you have to (map/grep,
>etc.). in your i/o loops use lexical vars (never while(<FOO>) as it sets
>$_).

5.10 is behind the corner...


Michele
-- 
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
 .'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,


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

Date: Thu, 22 Nov 2007 17:26:04 -0800 (PST)
From: wilburlo@gmail.com
Subject: Re: is this expected behavior? perl '' test.pl
Message-Id: <b490f27e-f789-4c70-bc0a-3c572f99a203@s8g2000prg.googlegroups.com>

> > arguments should probably be annoyed.
>
> Annoyed?
>

hehe, opps.

> > I didn't think a perlbug report was proper, so following the INSTALL
> > instructions ... here it is.
>
> I don't think a perlbug report would be inappropriate.

Ok :)

-daniel


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

Date: Thu, 22 Nov 2007 13:05:15 -0800 (PST)
From: Frieza <leonard_plummer@hotmail.co.uk>
Subject: Perl wont install
Message-Id: <ddb5f412-0bd9-434a-a971-317ee2285803@s36g2000prg.googlegroups.com>

Hi can anyone help I have a vista operating system i downloaded perl
msi package but when I install I get a message sayin unable to set or
remove path please do so manually can anyone come up with a solution.


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

Date: 22 Nov 2007 22:26:05 GMT
From: Joost Diepenmaat <joost@zeekat.nl>
Subject: Re: Perl wont install
Message-Id: <474601fd$0$16772$e4fe514c@dreader27.news.xs4all.nl>

On Thu, 22 Nov 2007 13:05:15 -0800, Frieza wrote:

> Hi can anyone help I have a vista operating system i downloaded perl msi
> package but when I install I get a message sayin unable to set or remove
> path please do so manually can anyone come up with a solution.

Which msi package is that? I'm assuming you mean the activestate.com one.

If everything else in the install process went right, it just means you 
can't execute perl from the command prompt without giving it's full path, 
i.e. you'd have to do:

c:\some\path\to\perl -e 'print "OK\n"'

instead of the easier

perl -e 'print "OK\n"'

you can fix that by setting/modifying the PATH environment variable to 
include the directory that the perl.exe was installed in.

On windows it should contain a ";" separated list of directories.

See also: http://banagale.com/changing-your-system-path-in-windows-
vista.htm

and http://www.computerhope.com/issues/ch000549.htm

Joost.




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

Date: Thu, 22 Nov 2007 12:52:53 -0800 (PST)
From: monk <rsarpi@gmail.com>
Subject: Re: POSIX signal handling: inputs needed
Message-Id: <84e9bc40-5643-4af0-a4f0-f8d24531289f@e6g2000prf.googlegroups.com>

Thanks for your comments mate.

>I would suggest to stick with the signals intended meanings.
        Ok. I'll use HUP, INT, TSTP, and TERM -after reading your
warnings.
As you pointed out, "Catching all signals will lead to instabilities"
which is quite right.

Of all the signal posix, which ones in your opinion are the most
common ones? (besides that ones above and the ones you already
mentioned.)


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

Date: Fri, 23 Nov 2007 01:43:14 GMT
From: Tad McClellan <tadmc@seesig.invalid>
Subject: Re: Regular expression help
Message-Id: <slrnfkb2bg.ccp.tadmc@tadmc30.sbcglobal.net>

Benedict White <benedictmpwhite@gmail.com> wrote:
> On Nov 21, 10:45 pm, Tad McClellan <ta...@seesig.invalid> wrote:
>> Benedict White <benedictmpwh...@gmail.com> wrote:
>> > I seem to have found a regex that works:
>>
>> It has at least 4 different problems.
>>
>> What does "works" mean when you say it?
>>
>> > [A-Za-Z]?[0-9][A-Za-Z]?...@example.com.com
>>
>> > Which matches emails to the example.com domain containing numbers.
>>
>> a-Z is not a valid range.
>>
>> at-signs need to be escaped in double-quotish contexts such
>> as a pattern.
>>
>> There are 2 ".com" substrings required by the pattern.
>>
>> It only allows a single character between the digit and
>> the at-sign. It doens't match 'foo2...@example.com.com' ...
>>
>
>
> Oops, that was a typo. 


Please copy/paste code rather than attempting to rekey it, and
introducing typos that are not in your actual code.


> It should have read:
>
> [A-Za-z]?[0-9][A-Za-z]?@example.com
>
> Which does work with egrep without escaping the @.


Silly me.

I thought we were talking Perl here in the Perl newsgroup.


> However you are right it will only match 1 letter after the last
> number before the att. Adding a * makes it two, 


Adding an asterisk where?

Got code?

Did you mean to say "replacing the ? with *" like:

   [A-Za-z]?[0-9][A-Za-z]*@example.com

??

That makes it makes it both less and more than two.


> but making it totally
> wild matches everything :(.


What does "totally wild" mean when you say it?

Got code?


-- 
Tad McClellan
email: perl -le "print scalar reverse qq/moc.noitatibaher\100cmdat/"


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

Date: Fri, 23 Nov 2007 00:43:08 GMT
From: Wilson <davewilson69@sbcglobal.net>
Subject: Re: Script to disconnect Linksys WRT54G wireless router on Windows
Message-Id: <wmp1j.11954$yV6.3301@newssvr25.news.prodigy.net>

On Thu, 22 Nov 2007 08:27:27 -0500, Sherman Pendley wrote:
> Perl - what makes you think that something is impossible simply because *you*
> can't figure it out?

I'd like to agree with you Sherman, but, it's pretty simple to prove my
point. Nobody else has figured it out either.

Keep in mind the Linksys WRT54G is one of the most common home routers on
the planet and that Cisco/Linksys makes very many others that are similar
and still - and still - even with all that going for it - nobody on the
planet has yet found or ever posted in the history of the Internet a
working perl script to press a button on the router. Any button. That isn't
proof - but how would you expect anyone to believe it can be done if nobody
has ever done it?

If someone provides a working perl script that, from windows, can press a
button (any button) on the Linksys WRT54G router in https mode - I'll agree
with you. Otherwise, it's either as you implied, nobody on earth has ever
tried using Perl to press a button (any button) on the most common router
on the planet -  or - as I have sadly concluded, despite my attempt at a
tutorial for the masses, it just can't be done in perl. 

I'm sure there is another way though so I'm not giving up on the project -
I'm just giving up on Perl as it seems to be a rather non-functional
language if it can't even do what takes me five manual presses with the
mouse. 

The good news is I'm still the Internet for that as yet unknown method to
press a button on an https web page as I digest my holiday turkey. :)

Wilson


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

Date: Thu, 22 Nov 2007 16:50:18 -0800
From: Wilson <davewilson69@sbcglobal.net>
Subject: Re: Script to disconnect Linksys WRT54G wireless router on Windows
Message-Id: <Jup1j.651$Vq.225@nlpi061.nbdc.sbc.com>

On Fri, 23 Nov 2007 00:43:08 GMT, Wilson wrote:

> The good news is I'm still the Internet for that as yet unknown method to
> press a button on an https web page as I digest my holiday turkey. :)

Oooooooops. I'm still *searching* the Internet for a method that works.
So, I haven't given up; I've just concluded Perl isn't able to perform the
three-step task of
* going to a certain web page 
* logging into an https connection
* press a particular button

I've downloaded some of the suggested Windows freeware and am seeing if
that will do it.

I've given up on the Perl tutorial for doing the three steps above so I do
thank you all for your kind help. I know you didn't have to help me. You
have edified me more than I could have done so myself. This is my last post
on the subject, having concluded what I should have known before I started.

That's the one thing you should have told me but I don't blame you. If it
can't be done, only the ones who have tried would know. Right?

Wilson


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

Date: Thu, 22 Nov 2007 19:54:13 +0100
From: Us <us@invalid.org>
Subject: Re: Why this file download CGI works with Firefox and fails with IE ?
Message-Id: <MPG.21afeec2bf3c787898998a@news.tiscali.fr>

In article <Xns99EE562E17127asu1cornelledu@127.0.0.1>, 
1usa@llenroc.ude.invalid says...
> "Petr Vileta" <stoupa@practisoft.cz> wrote in news:fhter2$2mbu$2
> @ns.felk.cvut.cz:
> 
> > #############################
> > try this
> > open FILE, "<$loc$file" or die "Have not privileges to read?";
> 
> open my $file, '<', "$loc$file"
>    or die "Cannot open '$loc$file': $!";
> 
> instead of guessing the error, include $! in the error message.
> 
> Sinan
> 
> 

It's what I do in the final script. The previous one was just a 
minimalist one for quick test


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

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 V11 Issue 1051
***************************************


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