[28947] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 191 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Mar 4 00:10:19 2007

Date: Sat, 3 Mar 2007 21:09:04 -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           Sat, 3 Mar 2007     Volume: 11 Number: 191

Today's topics:
    Re: Cool Free Offers <g_m@remove-comcast.net>
    Re: Cool Free Offers <g_m@remove-comcast.net>
    Re: display datestamp in HTML <jimmyc@trexagi.net>
    Re: guestbook.cgi :p <RedGrittyBrick@SpamWeary.foo>
    Re: guestbook.cgi :p krakle@visto.com
        IP in range? <stoupa@practisoft.cz>
    Re: IP in range? <paduille.4060.mumia.w+nospam@earthlink.net>
        need perl tutor, will PAY HighRiskMommy@gmail.com
    Re: new method to test Perl code krakle@visto.com
    Re: pattern serach over many files <anton.vandersteen@chello.nl>
    Re: Perl and MySQL krakle@visto.com
        quick scope question 1172948251@noid.net
    Re: quick scope question <paduille.4060.mumia.w+nospam@earthlink.net>
    Re: quick scope question 1172948251@noid.net
        Search the content of a file <anton.vandersteen@chello.nl>
    Re: Watch online TV and listen radio programes <g_m@remove-comcast.net>
    Re: Watch online TV and listen radio programes <spamtrap@dot-app.org>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Sat, 3 Mar 2007 13:08:17 -0500
From: "~greg" <g_m@remove-comcast.net>
Subject: Re: Cool Free Offers
Message-Id: <EeWdnbAmYYfgJHTYnZ2dnUVZ_qSrnZ2d@comcast.com>


"Uri Guttman" > writes:

> given your lack of understanding my response, i wonder if you can handle stem.
> it is called sarcasm. . . .

You wrote 'stem' in sarcasm?
It's sarcasmware?

I can handle that.
I just don't have any use for it.

And I think you should try to learn some perl
and rewrite 'stem' in perl instead.

~greg











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

Date: Sat, 3 Mar 2007 13:56:33 -0500
From: "~greg" <g_m@remove-comcast.net>
Subject: Re: Cool Free Offers
Message-Id: <Xt6dnbTyBZR5WXTYnZ2dnUVZ_rOqnZ2d@comcast.com>


oh, I get it now.

'stem' is really one of the "Cool Free Offers".

 ... and there's always a rube like me to fall for this...

customer >>  "Well, I can't say that I like any of the Cool Free Offers
               >> that you've shown me so far. But I have heard a rumor
               >> that you also have 'stem'?

dealer > - shhhh - shhh - we don't advertise that
          > on the top page. It's just for the more
          > discriminating of our customers...


Thus getting the customer, the mark
to think it was his own idea to bring it up.

bravo!







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

Date: Sat, 03 Mar 2007 11:33:25 -0500
From: Phil M <jimmyc@trexagi.net>
Subject: Re: display datestamp in HTML
Message-Id: <qf8ju2lvh28kma7mco3hmkhs3lm7cbsc1n@4ax.com>

>Stripped of its pompous commentary and its pathetically repetitious
>code, replace the whole thing by this:

Anno,

YOUR CODE WORKED! here:
http://s135598769.onlinehome.us/greekradio/psa.shtml

However, I had to rename the file with a .shtml to work.  Is there any
way to keep the .html extension?

Also, you may want to make this small and very efficient code
available somewhere because it may find good use among people with
webcams.  For example, every time a webcam a photo is uploaded, you
code will display the datestamp and timestamp of the photo, rather
than the date/time of the web page.  Good work!

Please inform for the .shtml issue.

Thanks again.


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

Date: Sat, 03 Mar 2007 16:11:52 +0000
From: RedGrittyBrick <RedGrittyBrick@SpamWeary.foo>
Subject: Re: guestbook.cgi :p
Message-Id: <EPSdnc2taJzdA3TYRVnysQA@bt.com>

anno4000@radom.zrz.tu-berlin.de wrote:
> john.swilting <john.swilting@wanadoo.fr> wrote in comp.lang.perl.misc:
>> john.swilting wrote:
>>
>>> #!/usr/bin/perl -Tw
>>> use strict;
>>> use CGI qw/:standard escapeHTML/;
>>> use Fcntl qw/:flock/;
>>> $|++;
>>>
>>> # Config
>>> my $GUESTBOOK = '/var/www/cgi-bin/guestbook.txt';
>>> my $TITLE = 'Guestbook';  # Title of guestbook
>>> my $MAX_MSGS = 5;         # Maximum number of messages displayed
>>> my $MAX_NAME = 50;        # Maximum length of name field
>>> my $MAX_EMAIL = 50;       # Maximum length of email field
>>> my $MAX_COMMENTS = 300;   # Maximum length of comments field
>>> # End Config
> 
> [snip more somewhat dated (5.6.1) but reasonably well-written Perl]
> 
>> I post. it is my code. you can say to me what you think that will make me
>> progress.
> 
> John, don't lie!  You know neither enough Perl nor English to be the
> author of that code.
> 

Indeed, Googling for the MAX_MSGS line of code suggests it came from 
http://www.telegard.net/

In http://www.telegard.net/tgfaq.html Tim Strike (apparently the current 
maintainer or owner of this code) says

"I have no intentions of releasing any of the source code that I produce"

"The Telegard 2.5g source code is floating around on various BBS and 
internet sites around the world. ... The legality of this source code is 
also in question"


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

Date: 3 Mar 2007 14:21:14 -0800
From: krakle@visto.com
Subject: Re: guestbook.cgi :p
Message-Id: <1172960474.646713.86490@j27g2000cwj.googlegroups.com>

On Mar 2, 5:46 am, "john.swilting" <john.swilt...@wanadoo.fr> wrote:
> john.swilting wrote:
> I post. it is my code. you can say to me what you think that will make me
> progress.

I think GuestBooks are dumb. The only 'people' who love to sign them
are housewives who own 6+ cats, 13 year old girls, spambots, and
probably Tad.

I also think flat file databases are a thing of 1997. They are slow,
less than effective and productive, and allow for to many security
holes and bugs.

I also think CGI.pm is worthless when it comes to printing HTML. John,
get up with the times! Check out some template modules that enables
the templates to be cached and ready on the fly! These days are all
about REAL database driven sites that use templates. Check out MayPole
or Catalyst.

Oh and... don't waste your time with guest book scripts!

Oh and... use English;



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

Date: Sun, 4 Mar 2007 02:56:06 +0100
From: "Petr Vileta" <stoupa@practisoft.cz>
Subject: IP in range?
Message-Id: <esd9c8$vk6$1@ns.felk.cvut.cz>

I have file where IP or IP ranges are written in different allowed formats 
like this

183.12.0.0/255.255.0.0
212.24/16
42.11.

How can I check if some unique IP is in range at some line? For example 
183.12.21.129 is in range at line 1 above.

-- 

Petr Vileta, Czech republic
(My server rejects all messages from Yahoo and Hotmail. Send me your mail 
from another non-spammer site please.)




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

Date: Sun, 04 Mar 2007 03:49:45 GMT
From: "Mumia W." <paduille.4060.mumia.w+nospam@earthlink.net>
Subject: Re: IP in range?
Message-Id: <tlrGh.8939$tD2.3044@newsread1.news.pas.earthlink.net>

On 03/03/2007 07:56 PM, Petr Vileta wrote:
> I have file where IP or IP ranges are written in different allowed 
> formats like this
> 
> 183.12.0.0/255.255.0.0
> 212.24/16
> 42.11.
> 
> How can I check if some unique IP is in range at some line? For example 
> 183.12.21.129 is in range at line 1 above.
> 

NetAddr::IP will do this for you.

     use strict;
     use warnings;
     require NetAddr::IP;

     my $ip = new NetAddr::IP ('183.12.21.129');
     my $netaddr = new NetAddr::IP ('183.12.0.0','16');

     if ($netaddr->contains($ip)) {
         print "$ip is inside $netaddr\n";
     }




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

Date: 3 Mar 2007 16:22:39 -0800
From: HighRiskMommy@gmail.com
Subject: need perl tutor, will PAY
Message-Id: <1172967759.761748.121100@i80g2000cwc.googlegroups.com>

hello all,

i need a perl tutor, preferably one with bioinformatics
knowledge..preferably in the NY area, but if you are not, we can still
talk on the phone.

i will pay you.  please contact me.

much appreciated!



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

Date: 3 Mar 2007 14:23:51 -0800
From: krakle@visto.com
Subject: Re: new method to test Perl code
Message-Id: <1172960631.076734.301300@p10g2000cwp.googlegroups.com>

On Feb 23, 12:55 pm, dnikola...@gmail.com wrote:
> If you are running Perl program in Basic tab than you are....well....
> a newbie :-)))))))))))))))))


If you are running ANY code using that web based tool you are...
well.... a newbie :)



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

Date: 3 Mar 2007 18:06:53 -0800
From: "anton.vandersteen@chello.nl" <anton.vandersteen@chello.nl>
Subject: Re: pattern serach over many files
Message-Id: <1172974013.822835.105270@p10g2000cwp.googlegroups.com>

On Mar 3, 4:42 pm, anno4...@radom.zrz.tu-berlin.de wrote:
> comp.llang.perl.moderated <c...@blv-sam-01.ca.boeing.com> wrote in comp.lang.perl.misc:
>
> > On Feb 15, 4:39 am, pavan...@gmail.com wrote:
>
> [...]
>
> > Tie::File (comes with Perl distro now) will
> > load a file into an array for you.  Slower
> > if big or many files but an easy upfront
> > change to use Tad's solution.
>
> Tie::File doesn't preload the file, if that's your concern, it uses tie
> magic to make it look as if it did.
>
> Anno

Hello to Perl Momks,

This is my sollution to the problem:

#!/perl/bin/perl
#This programme is written by Anton van der Steen
#Email adres: anton.vandersteen@chello.nl
use Tk;
use File::Find;

my $mw = new MainWindow; # Main Window
$mw->title("Search Engine  Version 2.0  by Stone Logic Systems");


######################################################################
$mw->configure(-menu => my $menubar = $mw->Menu);

my $filemenu = $menubar->cascade(-label   => "~File",
                             -tearoff => 1);
my $execute_sql_statement= $menubar->cascade(-label => "Count
~Phrase",
                                -tearoff=>1);
my $save_result_to_file = $menubar->cascade(-label => "~Show Text",
                                -tearoff=>1);
my $clear_text_area = $menubar->cascade(-label => "~Clear Result Set",
                                -tearoff=>1);
my $create_pdf = $menubar->cascade(-label => "~Export to File",
                                -tearoff=>1);
my $create_excel = $menubar->cascade(-label=> "Find File",
                                -tearoff=>1);

#my $create_xml = $menubar->cascade(-label=> "Export to XML",
#                                -tearoff=>1);

my $helpmenu = $menubar->cascade(-label   => "~Help",
                             -tearoff => 1);



$filemenu->command(-label   => "E~xit",
-command => sub{$mw->destroy});

$execute_sql_statement->command(-label => "Count ~Phrase",
-command=> sub{push_button1()});

$save_result_to_file->command(-label =>"~Show Text",
-command=> sub{push_button2()});

$clear_text_area->command(-label => "~Clear Result Set",
-command=> sub {push_button3()});

$create_pdf->command(-label => "~Export to File",
-command=> sub {push_button4()});

$create_excel->command(-label =>"Find File",
-command=> sub {push_button5()}) ;

#$create_xml->command(-label =>"Export to XML",
#-command=> sub {XML()});

$helpmenu->command(-label   => "~Help Contents",
-command => sub{showhelp()});

######################################################################
my $frm_name = $mw -> Frame() -> pack();

my $lab1 = $frm_name -> Label(-text=>"Phrase :", -font => '-adobe-
helvetica-bold-r-normal--11-120-75-75-p-70-*-1') -> pack();

my $ent1 = $frm_name -> Entry(-width=>100, -borderwidth=>2) -> pack();
$ent1->configure(-font => '-adobe-helvetica-bold-r-
normal--11-120-75-75-p-70-*-1');


my $lab2=$frm_name->Label(-text=>"Search in File :", -font => '-adobe-
helvetica-bold-r-normal--11-120-75-75-p-70-*-1')->pack();

my $ent2=$frm_name->Entry(-width=>100)->pack();
$ent2->configure(-font => '-adobe-helvetica-bold-r-
normal--12-120-75-75-p-70-*-1');

my $lab3=$frm_name->Label(-text=>"Export to file :", -font => '-adobe-
helvetica-bold-r-normal--11-120-75-75-p-70-*-1')->pack();

my $ent3=$frm_name->Entry(-width=>100)->pack();
$ent3->configure(-font => '-adobe-helvetica-bold-r-
normal--12-120-75-75-p-70-*-1');


#my $but1 = $mw -> Button(-text=>"Count Appearance Phrase", -command =>
\&push_button1, -background=>"green",
#	-font => '-adobe-helvetica-bold-r-normal--11-120-75-75-p-70-*-1') ->
pack();

#my $but2 = $mw -> Button(-text=>"Show text", -command =>
\&push_button2, -background=>"yellow",
#	-font => '-adobe-helvetica-bold-r-normal--11-120-75-75-p-70-*-1') ->
pack();

#my $but3 = $mw -> Button(-text=>"Clear Text Area", -command =>
\&push_button3, -background=>"orange",
#	-font => '-adobe-helvetica-bold-r-normal--11-120-75-75-p-70-*-1') ->
pack();

#my $but4 = $mw -> Button(-text=>"Save result to file", -command =>
\&push_button4, -background=>"cyan",
#	-font => '-adobe-helvetica-bold-r-normal--11-120-75-75-p-70-*-1') ->
pack();



#Text Area
my $txt = $mw->Scrolled( 'Text' , -scrollbars=>'se' , -wrap=>
'none',);
$txt->configure(-width=>120, -height=>20, -font => '-adobe-helvetica-
bold-r-normal--14-120-75-75-p-70-*-1');
$txt->pack();

MainLoop;

sub push_button1 {

	use Getopt::Std;

	my $name1 = $ent1 -> get();
	my $name2 = $ent2 -> get();
	@ARGV= ($name1, $name2);
	#print @ARGV;

	$i=0;

	my $pattern = shift @ARGV;


	foreach $file (@ARGV)
	{
	open (FILE, $file);
	while ($line = <FILE>)
	{
		if ($line =~m"$pattern")
	{
		$i++;
		last if ($opt_1);


	}

	}
	#print "The phrase $pattern is $i times found!!\n";


		$txt-> insert ('0.0',"The phrase $pattern is $i times found in file
$file.\n");
		close (FILE);
		$i=0;

	}


sub push_button2 {

	use Getopt::Std;

	my $name1 = $ent1 -> get();
	my $name2 = $ent2 -> get();
	@ARGV= ($name1, $name2);

	$i=0;

	my $pattern = shift @ARGV;


	foreach $file (@ARGV)
	{
	open (FILE, $file);
	while ($line = <FILE>)
	{
		if ($line =~m"$pattern")
	{
		$i++;
		last if ($opt_1);
		$txt-> insert ('end', "$line\n");
		#print "$line\n";

	}

	}

		close (FILE);
		$i=0;

	}

	}


sub push_button3 {
		$txt-> delete ('0.0', 'end');


	}

sub push_button4 {

	use Getopt::Std;

	my $name1 = $ent1 -> get();
	my $name2 = $ent2 -> get();
	my $file_out = $ent3 -> get();

	@ARGV= ($name1, $name2);

	$i=0;

	my $pattern = shift @ARGV;

	open(OUT,">$file_out");


	foreach $file (@ARGV)
	{
	open (FILE, $file);
	while ($line = <FILE>)
	{
		if ($line =~m"$pattern")
	{
		$i++;
		last if ($opt_1);
		print OUT "$line\n";

	}

	}

		close (FILE);
		$i=0;

	}
	close(OUT);

	}
        }

sub push_button5{

                 find(\&push_button6, "c:\\")



                }


sub push_button6 {

	use Getopt::Std;
	use File::Find;

	my $a = $ent1 -> get();



  if       (/\.$a$/)    #  ((/\.zip$/) ||
 {      #print "$File::Find::name\n";
        $txt-> insert ('end', "$File::Find::name\n");
 }
 }

 ;




Have fun......



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

Date: 3 Mar 2007 14:27:19 -0800
From: krakle@visto.com
Subject: Re: Perl and MySQL
Message-Id: <1172960839.704315.189330@t69g2000cwt.googlegroups.com>

On Mar 2, 9:20 am, "DJ Stunks" <DJStu...@gmail.com> wrote:
> On Mar 2, 12:37 am, kra...@visto.com wrote:
>
> > On Feb 28, 11:44 am, "Charles A. Landemaine" <landema...@gmail.com>
> > wrote:
>
> > > I have a MySQL table that is used to store comments on my blog. I just
> > > found out it's filled with spam.
> > > The table itself is 2 GB big, with
> > > more than half a million spam backlinks.
>
> > Since you have to check row by row, indexes aren't important. So, at 3
> > am run this query:
>
> > DELETE FROM myTable WHERE myColumn = '%<a href%';
>
> ITYM "... WHERE myColumn LIKE '%<a href%';"
>
> -jp

Yes. That is correct. Thank you.



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

Date: 3 Mar 2007 11:03:03 -0800
From: 1172948251@noid.net
Subject: quick scope question
Message-Id: <1172948583.217001.286710@j27g2000cwj.googlegroups.com>


I want to maintain my $version variable in a single place
within the script and I want it available in a BEGIN block
that is a different package from the rest of the script.  Is
this possible?  Here's what I mean:

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

#!/usr/bin/perl

BEGIN {
  package Some::Package;
  my $version = '1';
  print "version is $version\n";
}

my $version = $Some::Package::version;
print ("version is $version\n");       # not initialized ???



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

Date: Sat, 03 Mar 2007 20:16:08 GMT
From: "Mumia W." <paduille.4060.mumia.w+nospam@earthlink.net>
Subject: Re: quick scope question
Message-Id: <cIkGh.5957$PL.2385@newsread4.news.pas.earthlink.net>

On 03/03/2007 01:03 PM, 1172948251@noid.net wrote:
> I want to maintain my $version variable in a single place
> within the script and I want it available in a BEGIN block
> that is a different package from the rest of the script.  Is
> this possible?  Here's what I mean:
> 
> ---------------
> 
> #!/usr/bin/perl
> 
> BEGIN {
>   package Some::Package;
>   my $version = '1';

Use "our" instead:

     our $version = '1';

>   print "version is $version\n";
> }
> 
> my $version = $Some::Package::version;
> print ("version is $version\n");       # not initialized ???
> 

When you want a variable to be package scoped, use "our":

perldoc -f our


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

Date: 3 Mar 2007 13:39:15 -0800
From: 1172948251@noid.net
Subject: Re: quick scope question
Message-Id: <1172957955.634459.138020@v33g2000cwv.googlegroups.com>

On Mar 3, 12:16 pm, "Mumia W." <paduille.4060.mumia.w
+nos...@earthlink.net> wrote:
> On 03/03/2007 01:03 PM, 1172948...@noid.net wrote:
>
> > I want to maintain my $version variable in a single place
> > within the script and I want it available in a BEGIN block
> > that is a different package from the rest of the script.  Is
> > this possible?  Here's what I mean:
>
> > ---------------
>
> > #!/usr/bin/perl
>
> > BEGIN {
> >   package Some::Package;
> >   my $version = '1';
>
> Use "our" instead:
>
>      our $version = '1';
>
> >   print "version is $version\n";
> > }
>
> > my $version = $Some::Package::version;
> > print ("version is $version\n");       # not initialized ???
>
> When you want a variable to be package scoped, use "our":
>
> perldoc -f our

Using "our" works perfectly...  Thanks!



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

Date: 3 Mar 2007 18:09:30 -0800
From: "anton.vandersteen@chello.nl" <anton.vandersteen@chello.nl>
Subject: Search the content of a file
Message-Id: <1172974170.333560.302320@t69g2000cwt.googlegroups.com>

Hello Perl addicts,

This is my sollution:

#!/perl/bin/perl
#This programme is written by Anton van der Steen
#Email adres: anton.vandersteen@chello.nl
use Tk;
use File::Find;

my $mw = new MainWindow; # Main Window
$mw->title("Search Engine  Version 2.0  by Stone Logic Systems");


######################################################################
$mw->configure(-menu => my $menubar = $mw->Menu);

my $filemenu = $menubar->cascade(-label   => "~File",
                             -tearoff => 1);
my $execute_sql_statement= $menubar->cascade(-label => "Count
~Phrase",
                                -tearoff=>1);
my $save_result_to_file = $menubar->cascade(-label => "~Show Text",
                                -tearoff=>1);
my $clear_text_area = $menubar->cascade(-label => "~Clear Result Set",
                                -tearoff=>1);
my $create_pdf = $menubar->cascade(-label => "~Export to File",
                                -tearoff=>1);
my $create_excel = $menubar->cascade(-label=> "Find File",
                                -tearoff=>1);

#my $create_xml = $menubar->cascade(-label=> "Export to XML",
#                                -tearoff=>1);

my $helpmenu = $menubar->cascade(-label   => "~Help",
                             -tearoff => 1);



$filemenu->command(-label   => "E~xit",
-command => sub{$mw->destroy});

$execute_sql_statement->command(-label => "Count ~Phrase",
-command=> sub{push_button1()});

$save_result_to_file->command(-label =>"~Show Text",
-command=> sub{push_button2()});

$clear_text_area->command(-label => "~Clear Result Set",
-command=> sub {push_button3()});

$create_pdf->command(-label => "~Export to File",
-command=> sub {push_button4()});

$create_excel->command(-label =>"Find File",
-command=> sub {push_button5()}) ;

#$create_xml->command(-label =>"Export to XML",
#-command=> sub {XML()});

$helpmenu->command(-label   => "~Help Contents",
-command => sub{showhelp()});

######################################################################
my $frm_name = $mw -> Frame() -> pack();

my $lab1 = $frm_name -> Label(-text=>"Phrase :", -font => '-adobe-
helvetica-bold-r-normal--11-120-75-75-p-70-*-1') -> pack();

my $ent1 = $frm_name -> Entry(-width=>100, -borderwidth=>2) -> pack();
$ent1->configure(-font => '-adobe-helvetica-bold-r-
normal--11-120-75-75-p-70-*-1');


my $lab2=$frm_name->Label(-text=>"Search in File :", -font => '-adobe-
helvetica-bold-r-normal--11-120-75-75-p-70-*-1')->pack();

my $ent2=$frm_name->Entry(-width=>100)->pack();
$ent2->configure(-font => '-adobe-helvetica-bold-r-
normal--12-120-75-75-p-70-*-1');

my $lab3=$frm_name->Label(-text=>"Export to file :", -font => '-adobe-
helvetica-bold-r-normal--11-120-75-75-p-70-*-1')->pack();

my $ent3=$frm_name->Entry(-width=>100)->pack();
$ent3->configure(-font => '-adobe-helvetica-bold-r-
normal--12-120-75-75-p-70-*-1');


#my $but1 = $mw -> Button(-text=>"Count Appearance Phrase", -command =>
\&push_button1, -background=>"green",
#	-font => '-adobe-helvetica-bold-r-normal--11-120-75-75-p-70-*-1') ->
pack();

#my $but2 = $mw -> Button(-text=>"Show text", -command =>
\&push_button2, -background=>"yellow",
#	-font => '-adobe-helvetica-bold-r-normal--11-120-75-75-p-70-*-1') ->
pack();

#my $but3 = $mw -> Button(-text=>"Clear Text Area", -command =>
\&push_button3, -background=>"orange",
#	-font => '-adobe-helvetica-bold-r-normal--11-120-75-75-p-70-*-1') ->
pack();

#my $but4 = $mw -> Button(-text=>"Save result to file", -command =>
\&push_button4, -background=>"cyan",
#	-font => '-adobe-helvetica-bold-r-normal--11-120-75-75-p-70-*-1') ->
pack();



#Text Area
my $txt = $mw->Scrolled( 'Text' , -scrollbars=>'se' , -wrap=>
'none',);
$txt->configure(-width=>120, -height=>20, -font => '-adobe-helvetica-
bold-r-normal--14-120-75-75-p-70-*-1');
$txt->pack();

MainLoop;

sub push_button1 {

	use Getopt::Std;

	my $name1 = $ent1 -> get();
	my $name2 = $ent2 -> get();
	@ARGV= ($name1, $name2);
	#print @ARGV;

	$i=0;

	my $pattern = shift @ARGV;


	foreach $file (@ARGV)
	{
	open (FILE, $file);
	while ($line = <FILE>)
	{
		if ($line =~m"$pattern")
	{
		$i++;
		last if ($opt_1);


	}

	}
	#print "The phrase $pattern is $i times found!!\n";


		$txt-> insert ('0.0',"The phrase $pattern is $i times found in file
$file.\n");
		close (FILE);
		$i=0;

	}


sub push_button2 {

	use Getopt::Std;

	my $name1 = $ent1 -> get();
	my $name2 = $ent2 -> get();
	@ARGV= ($name1, $name2);

	$i=0;

	my $pattern = shift @ARGV;


	foreach $file (@ARGV)
	{
	open (FILE, $file);
	while ($line = <FILE>)
	{
		if ($line =~m"$pattern")
	{
		$i++;
		last if ($opt_1);
		$txt-> insert ('end', "$line\n");
		#print "$line\n";

	}

	}

		close (FILE);
		$i=0;

	}

	}


sub push_button3 {
		$txt-> delete ('0.0', 'end');


	}

sub push_button4 {

	use Getopt::Std;

	my $name1 = $ent1 -> get();
	my $name2 = $ent2 -> get();
	my $file_out = $ent3 -> get();

	@ARGV= ($name1, $name2);

	$i=0;

	my $pattern = shift @ARGV;

	open(OUT,">$file_out");


	foreach $file (@ARGV)
	{
	open (FILE, $file);
	while ($line = <FILE>)
	{
		if ($line =~m"$pattern")
	{
		$i++;
		last if ($opt_1);
		print OUT "$line\n";

	}

	}

		close (FILE);
		$i=0;

	}
	close(OUT);

	}
        }

sub push_button5{

                 find(\&push_button6, "c:\\")



                }


sub push_button6 {

	use Getopt::Std;
	use File::Find;

	my $a = $ent1 -> get();



  if       (/\.$a$/)    #  ((/\.zip$/) ||
 {      #print "$File::Find::name\n";
        $txt-> insert ('end', "$File::Find::name\n");
 }
 }

 ;


Have fun.....



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

Date: Sat, 3 Mar 2007 15:58:04 -0500
From: "~greg" <g_m@remove-comcast.net>
Subject: Re: Watch online TV and listen radio programes
Message-Id: <O_OdnducGP_afHTYnZ2dnUVZ_sGqnZ2d@comcast.com>


"stoyan" <ystoyan@gmail.com> wrote in message news:1172953800.750289.14810@h3g2000cwc.googlegroups.com...
> Dear members,
> you can watch free tv and listen radio programs, educational programs,
> business, financial news, movies, animation, music and TV series from
> all over the world without any registration:
>
> http://www.television.bg/
>
> I think that would be useful to you.
>


What's your perl question?


(Uri
- what are we supposed to do?

Should we put this in our "favorites",
or should we plonk it? )







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

Date: Sat, 03 Mar 2007 16:31:34 -0500
From: Sherm Pendley <spamtrap@dot-app.org>
Subject: Re: Watch online TV and listen radio programes
Message-Id: <m2ejo6nhe1.fsf@local.wv-www.com>

"~greg" <g_m@remove-comcast.net> writes:

> What's your perl question?
>
>
> (Uri
> - what are we supposed to do?
>
> Should we put this in our "favorites",
> or should we plonk it? )

For someone who claims to be old, you're acting like a spoiled child who's
had his favorite toy taken away. Grow up.

sherm--

-- 
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net


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

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


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