RE: MakeMaker issues
16MBytes are you sure ?? That's criminal. I'll snail mail you some RAM, I probably have it laying around some where. yu=yugoslavia ?? tesla, hmm, he was a great physicist. may cost more to mail than the ram is worth ?? > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]]On Behalf Of > Nikola Knezevic > Sent: Friday, June 15, 2001 7:07 AM > To: Lee Goddard > Cc: Sisyphus; Perl_Users > Subject: RE: MakeMaker issues > > > On Fri, 15 Jun 2001, Lee Goddard wrote: > > > > > Not too bad: too about an hour to compile all in all, > including tests. > > > AMD486Dx4, RAM=16MB, Win95, VC++5. It's slow. > > Ah, well, that explains it! RAM is so cheap now...!! > > Yes, if you can find it:)) Even antique-shops doesn't have that memory > (slow, nonEDO, nonSDRAM, slow again, for 486 computers) > > > BTW - whawt does > > > ... Pravi petodolarac! Vidio sam jednog takvog osobno u > maju 1946... > > mean in English? > > Arhm, well, ouh, ar... > If you have read the comic 'Alan Ford', this is translated > reply from (I > think) No.1 . In English, it should be retranslated to:) > Real 5-bucks-coin (grr, bad translation, my comment)! I saw > one myself in th > May of 1946. > > translation for the one below: > I'm not interested for fame and glory. Only for money! > -- > ... Mene slava i novac ne zanimaju. Zanima me samo novac! > > - --- -- ---=- --==---===-[Nikola Knezevic]---===+ > +- -=- -==--=- -=-- --- -- - http://users.hemo.net/indy --- -- - > > > ___ > Perl-Win32-Users mailing list > [EMAIL PROTECTED] > http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users > ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
RE: newbie Perl/NT question
check out roth.net David has Perl scripts with this functionality. and other really good links. He's changed the site around so i don't have a direct link. Look for Win32::AdminMisc Lot's of good stuff there, you'll be up late. clp > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]]On Behalf Of > Kirk W. Batzer > Sent: Friday, June 15, 2001 9:45 PM > To: 'John Dunn'; 'Perl-Win32-Users Mailing List' > Subject: RE: newbie Perl/NT question > > > I frequently use the "at" command. It can be run from a client NT/W2K > machine to schedule and run programs, scripts, etc on remote NT/W2K > machines. It can be a little tricky. Permissions seem to be the most > trouble. But I do this frequently. > > > Kirk W. Batzer > [EMAIL PROTECTED] > > > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]] On Behalf Of > John Dunn > Sent: Friday, June 15, 2001 11:11 AM > To: 'Perl-Win32-Users Mailing List' > Subject: newbie Perl/NT question > > > We have some simple batch type perl scripts that we want to > run on an NT > server. > > The guestion is how do we start these from a client PC, but > ensure that > they actually run on the server, not the PC. Is this possible > or should > we be starting this bat files via a NT service or some sort > of start up > script? > > Can I turn my perl script into an NT service? > > John > > > ___ > Perl-Win32-Users mailing list > [EMAIL PROTECTED] > http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users > > ___ > Perl-Win32-Users mailing list > [EMAIL PROTECTED] > http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users > ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
Re: how to list perl modules!!
- Original Message - From: "Siva Namburi" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, June 12, 2001 5:28 AM Subject: how to list perl modules!! > Hi, > > I was trying to list all the perl modules that are installed on my > machine (w.r.t a particular build). It is a freeBSD box. If there is a > command that works on windows, i can probably use the same command on > freeBSD. I was wondering if anybody could help me with this. > > regards, > siva > > Hi, I think you'll have to recurse through @INC directories grepping for '*.pm' , listing all matches (and their paths relative to the @INC directory). This is pretty much the way that perl looks for requested modules, and determines whether they are present. Cheers, Rob ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
Re: Find and replace
- Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, June 14, 2001 10:35 AM Subject: Find and replace > Hi > > Please help!!! I have spent hours doing this I am new... > > I want to do the following > > >I read every line of the data that is passed to the script. Then I want to > >check each line for an occurrence of the $ sign. If the $ sign is found I > >want to replace it with the complete string "push > >\fn"Euro > >Sign".e\pop" > > > What is the best way to do so,. > > Thanks in advance > Hazel Choi > > _ Hi, $data =~ s/\$/push \\fn"Euro Sign"\.e\\pop/g; or, if you want it formatted as in the email: $data =~ s/\$/push\n\\fn"Euro\nSign"\.e\\pop/g; The 'g' will accommodate multiple occurrences of '$' in '$data'. Cheers, Rob. ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
RE: An Index of Incivility in the Perl Community [SPOOFED?]
Dean -- I think someone is spoofing some old posts. I was trying to figure out where they are coming from. The other post had my name, but posted way back. Anyone know ??? Re: your post, though I have confidence and faith in all the open source fanatics out there. In twenty years, It will likely be some flavor of open source something. It's people like us that are steering the ship. When I started pushing windoze 15 years I was bashed by the DECheads. Well, they got PC'd. Just like DEC zapped BigBlue. Now corporate USA is doing windoze, the are always, always, laggards. We put in a 100 node Beowulf cluster last year, adios Cray and SGI. Running a Raidzone ATA raid, check that one out, streaming data at 100+MBytes/sec. Power, OpenSource, NUMA bus is about to hit Linux clusters It will be a awesome ride, hold on. I'm gonna get me one. 8-)) clp > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]]On Behalf Of > Dean Theophilou > Sent: Friday, June 15, 2001 9:29 PM > To: Perl Users List > Subject: RE: An Index of Incivility in the Perl Community [Xpost] > > > Very funny. Although it won't be for another 20-50 years, > the UNIX OS will > cease to exist as a widely-used OS. This is not a bash > against UNIX; it IS > a high-quality OS. However, the elitism I have found among > UNIX people is > tremendous! Such elitism is one of the biggest (if not THE > biggest) reason > that Apple got screwed, and it is exactly for the same reason > that UNIX will > be screwed too. > > For all of it's problems, Windows has a great look and feel; > I can't tell > you how many times I've heard UNIX people whine about how > much better a > command-line-based OS is. But the fact of the matter is that > command-lines > have their time and place, and it is NOT all the time and any place. > Frequently, using a GUI is a better and more efficient approach. > > Nevertheless, there is one thing that I think nobody will > disagree with: the > Windows OSs have made computers accessible to just about > everyone...from a 5 > year old to a 60+ year old...and the proliferation of computers in our > society has made my job all that much more in demand (and > profitable). So I > thank MS (or M$, if you prefer) and am very appreciative, in spite of > whether or not it is a "real" OS. > > > Dean Theophilou > Genisar > > > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]]On Behalf Of > Mark Folse > Sent: Monday, June 11, 2001 6:44 AM > To: [EMAIL PROTECTED] > Cc: [EMAIL PROTECTED] > Subject: RE: An Index of Incivility in the Perl Community [Xpost] > > > What? You don't have a Real Operating System? That's your problem! ; ) > > > my only > > wish is that perlmonks was a bit more friendly to those of us in the > > corporate > > world who have no choice but to use WinTel and not Linux. > > > > John > > > > -Original Message- > > From: Chris Pettit [mailto:[EMAIL PROTECTED]] > > Sent: Saturday, June 09, 2001 9:18 PM > > To: [EMAIL PROTECTED] > > Cc: [EMAIL PROTECTED] > > Subject: RE: An Index of Incivility in the Perl Community [Xpost] > > > > > > Greetings -- > > Good research. > > In a similar thread I suggested that the Perl group have a list > > modeled > > after the Python[Tutor] list. > > They are remarkably kind to folks, and certainly, many folks are too > > lazy to > > look things up before posting. > > > > Folks like Matt on XML and DaveR on Win32 have done some remarkable > > efforts > > to organize informational web sites. It seems a shame that with all > > the raw > > talent out there that a > > site with the structure of a SourceForge could not be put > together to > > channel the learning effort for P(erl||ython),TCL, etc. > > > > ActiveState,CPAN, & Perldoc are certainly deserving of credit. They > > have > > done a great deal to provide resources for the scripting community. > > > > I think the energies of the folks out there producing modules, > > bindings and > > languages are better served building code, not maintaining web sites > > and > > answering similar questions so often. I sent a note to > > [EMAIL PROTECTED] > > once and Guido himself responded. Another thing, it is incredible > > how kind > > and seemingly humble some of these mega-giants-of-programming can be > > to mere > > lame mortals like myself. > > > > It would benefit all if a site structured like SourceForge, for lack > > of > > something better call it something like InfoForge or Opendox was to > > organize > > printable/searchable Faqs to answer these types of questions. > > The Perl documentation can be challenging to find things. > > ( no flashing banner ads/gifs allowed ) > > > > I know a LOT of experienced programers that are intimidated by Perl. > > [4real] > > There is a lot of syntax things that seem to occur by magic like <> > > @_. > > I pulled out a Perl book, $_ was covered on p.363-364. > > > > The Perl gang reminds me of name that tune... > > H*ll, I can write that
RE: newbie Perl/NT question
I frequently use the "at" command. It can be run from a client NT/W2K machine to schedule and run programs, scripts, etc on remote NT/W2K machines. It can be a little tricky. Permissions seem to be the most trouble. But I do this frequently. Kirk W. Batzer [EMAIL PROTECTED] -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of John Dunn Sent: Friday, June 15, 2001 11:11 AM To: 'Perl-Win32-Users Mailing List' Subject: newbie Perl/NT question We have some simple batch type perl scripts that we want to run on an NT server. The guestion is how do we start these from a client PC, but ensure that they actually run on the server, not the PC. Is this possible or should we be starting this bat files via a NT service or some sort of start up script? Can I turn my perl script into an NT service? John ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
RE: newbie Perl/NT question
I frequently use the "at" command. It can be run from a client NT/W2K machine to schedule and run programs, scripts, etc on remote NT/W2K machines. It can be a little tricky. Permissions seem to be the most trouble. But I do this frequently. Kirk W. Batzer [EMAIL PROTECTED] -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of John Dunn Sent: Friday, June 15, 2001 11:11 AM To: 'Perl-Win32-Users Mailing List' Subject: newbie Perl/NT question We have some simple batch type perl scripts that we want to run on an NT server. The guestion is how do we start these from a client PC, but ensure that they actually run on the server, not the PC. Is this possible or should we be starting this bat files via a NT service or some sort of start up script? Can I turn my perl script into an NT service? John ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
RE: UNIX like #!
Perl.exe needs to be on the path. You need to have an association with file types *.pl to perl.exe Are you familiar with the processes ?? What windoze do you have ?? -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Lokesh GuptaSent: Wednesday, June 13, 2001 5:39 PMTo: [EMAIL PROTECTED]Subject: UNIX like #! In a UNIX perl script I can specify the location of the perl executable on the first line (shown below): #!/usr/local/bin/perl How can I achieve this in Windows environment, so that I do not have to always say at the command prompt: perl my_perl_script.pl Thanks Lokesh
Re: An Index of Incivility in the Perl Community [Xpost]
Dean Theophilou wrote: > > Very funny. Although it won't be for another 20-50 years, the UNIX OS will > cease to exist as a widely-used OS. This is not a bash against UNIX; it IS > a high-quality OS. However, the elitism I have found among UNIX people is > tremendous! Such elitism is one of the biggest (if not THE biggest) reason > that Apple got screwed, and it is exactly for the same reason that UNIX will > be screwed too. > > For all of it's problems, Windows has a great look and feel; I can't tell > you how many times I've heard UNIX people whine about how much better a > command-line-based OS is. But the fact of the matter is that command-lines > have their time and place, and it is NOT all the time and any place. > Frequently, using a GUI is a better and more efficient approach. Duh - ever hear of X-Windows ? UNIX has both a fantastic set of commandline utilities, but it also has some of the best GUI apps around. The commandline just happens to get where you're going faster (unless you don't have the expertise to use it :). -- ,-/- __ _ _ $Bill Luebkert ICQ=14439852 (_/ / )// // DBE Collectibles Mailto:[EMAIL PROTECTED] / ) /--< o // // http://dbecoll.webjump.com/ (Free Perl site) -/-' /___/_<_http://www.todbe.com/ ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
RE: An Index of Incivility in the Perl Community [Xpost]
Very funny. Although it won't be for another 20-50 years, the UNIX OS will cease to exist as a widely-used OS. This is not a bash against UNIX; it IS a high-quality OS. However, the elitism I have found among UNIX people is tremendous! Such elitism is one of the biggest (if not THE biggest) reason that Apple got screwed, and it is exactly for the same reason that UNIX will be screwed too. For all of it's problems, Windows has a great look and feel; I can't tell you how many times I've heard UNIX people whine about how much better a command-line-based OS is. But the fact of the matter is that command-lines have their time and place, and it is NOT all the time and any place. Frequently, using a GUI is a better and more efficient approach. Nevertheless, there is one thing that I think nobody will disagree with: the Windows OSs have made computers accessible to just about everyone...from a 5 year old to a 60+ year old...and the proliferation of computers in our society has made my job all that much more in demand (and profitable). So I thank MS (or M$, if you prefer) and am very appreciative, in spite of whether or not it is a "real" OS. Dean Theophilou Genisar -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Mark Folse Sent: Monday, June 11, 2001 6:44 AM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: RE: An Index of Incivility in the Perl Community [Xpost] What? You don't have a Real Operating System? That's your problem! ; ) > my only > wish is that perlmonks was a bit more friendly to those of us in the > corporate > world who have no choice but to use WinTel and not Linux. > > John > > -Original Message- > From: Chris Pettit [mailto:[EMAIL PROTECTED]] > Sent: Saturday, June 09, 2001 9:18 PM > To: [EMAIL PROTECTED] > Cc: [EMAIL PROTECTED] > Subject: RE: An Index of Incivility in the Perl Community [Xpost] > > > Greetings -- > Good research. > In a similar thread I suggested that the Perl group have a list > modeled > after the Python[Tutor] list. > They are remarkably kind to folks, and certainly, many folks are too > lazy to > look things up before posting. > > Folks like Matt on XML and DaveR on Win32 have done some remarkable > efforts > to organize informational web sites. It seems a shame that with all > the raw > talent out there that a > site with the structure of a SourceForge could not be put together to > channel the learning effort for P(erl||ython),TCL, etc. > > ActiveState,CPAN, & Perldoc are certainly deserving of credit. They > have > done a great deal to provide resources for the scripting community. > > I think the energies of the folks out there producing modules, > bindings and > languages are better served building code, not maintaining web sites > and > answering similar questions so often. I sent a note to > [EMAIL PROTECTED] > once and Guido himself responded. Another thing, it is incredible > how kind > and seemingly humble some of these mega-giants-of-programming can be > to mere > lame mortals like myself. > > It would benefit all if a site structured like SourceForge, for lack > of > something better call it something like InfoForge or Opendox was to > organize > printable/searchable Faqs to answer these types of questions. > The Perl documentation can be challenging to find things. > ( no flashing banner ads/gifs allowed ) > > I know a LOT of experienced programers that are intimidated by Perl. > [4real] > There is a lot of syntax things that seem to occur by magic like <> > @_. > I pulled out a Perl book, $_ was covered on p.363-364. > > The Perl gang reminds me of name that tune... > H*ll, I can write that code in three lines > the seive of Erathosenes in ONE line, give me a break, i saw that > one. > from the command line no-less. I love this stuff. > > Perhaps a Perl[Assist] group to organize it. How many times > have people written to dbi-users on installing DBD::Oracle ??? > And they don't even have the Oracle client installed. > > Maybe, it's just circumstance, but it seems that interest in Perl is > increasing. > In the bookstores i've seen alot of people picking up Perl books > lately. > Twice in the last week I've suggested the Perl-DBI book. > > Often, when i can take the time to reply to posts, I will try to find > a link > and send it to people. Folks that tell/hint at others to RTFM might > be just > as lazy as the person doing the posting !!! > So, if we had a place to tell them where to go ;-0 , meaning a real > link, it > would help. > An organized effort would help eliminate the inumerable dead links to > info > out there. > As I stated earlier, a SourceForge like site would be helpful. > Like: > [FAQ] [PerlDoc] [Cookbook] [SampleCode] [Hints] [Links] [Books] > [Whitepapers] > > And, have volunteers run each module or topic. > If someone drops the ball others will likely volunteer to pick it up. > Like wise if someone does a poor job, control could be transferred if > complaints are
grep
Hi, quick question...I am using grep to filter out files of certain extensions. for some reason, if i only want .c files, it leaves in .rc files. or if i were to specify .p, it would leave in .dsp and .cpp. However, if i were to specify .cpp, it would not leave in .c. any ideas? if so, please reply to me personally. Thanks, Tanya Graham ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
Find and replace
Hi Please help!!! I have spent hours doing this I am new... I want to do the following >I read every line of the data that is passed to the script. Then I want to >check each line for an occurrence of the $ sign. If the $ sign is found I >want to replace it with the complete string "push >\fn"Euro >Sign".e\pop" > What is the best way to do so,. Thanks in advance Hazel Choi _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
UNIX like #!
In a UNIX perl script I can specify the location of the perl executable on the first line (shown below): #!/usr/local/bin/perl How can I achieve this in Windows environment, so that I do not have to always say at the command prompt: perl my_perl_script.pl Thanks Lokesh
RE: Perl-Win32-Users digest, Vol 1 #481 - 39 msgs
general syntax, but should be enough for you to get the idea: > From: Wagner-David <[EMAIL PROTECTED]> > To: "'Perl Win32'" <[EMAIL PROTECTED]> > Subject: [OLE]Delete some Excecel Worksheets and rename to a > different loc > ation > Date: Mon, 11 Jun 2001 17:00:25 -0700 > > Sub DeleteSheet() > ' > ' DeleteSheet Macro > ' Macro recorded 06/11/2001 by DWAGNE01 > ' > > ' > Application.DisplayAlerts = False > Sheets("Sheet1").Select > ActiveWindow.SelectedSheets.Delete > ChDir "C:\Tariffs\VK 671" > ActiveWorkbook.SaveAs Filename:="C:\Tariffs\VK 671\12048 > CANCEL a.xls", > _ > FileFormat:=xlExcel5, Password:="", WriteResPassword:="", _ > ReadOnlyRecommended:=False, CreateBackup:=False > End Sub > > =cut $ex = Win32::OLE->New( 'Excel.Application', sub {$_[0]->Quit}); # if your going to put this in a sub, either a) #make global var b) pass the object explicitly to each sub (prefered by me); DisplayAlerts is a property. You access object properties with this syntax: Application.DisplayAlerts = False ' VB example $ex->{DisplayAlerts} = 0; # perl example assumes you have $ex defined as an object with DisplayAlerts as one of #its properties.. Not sure, but I believe "ActiveWindow" is an object contained by the "Application" object. so if that be.. $ex->Workbooks("workbooknamehere")->Sheets("Sheet1")->Select(); # You could probably just call the delete ## method next, instead of doing the activesheets thing or perhaps even changing the select method above ## to Delete $ex->ActiveSheet->Delete(); You may also want create a new object with: $bookname = Win32::OLE->New( 'Excel.Workbook') and take out the first and middle parts and do $bookname->Sheets("Sheet1")->Select(); Its all up to you. As I said, this is untested, and may even be wrong in one or two places, but you should get the idea.. > > >$excel->application('DisplayAlerts'=>0); > # This is > not correct >foreach my $sheet (in $book->Worksheets) { >$ByPass1++; >next if ($ByPass1 < 1 ); >$book->Select($sheet); > # > this is not correct >$book->ActiveWindow->SelectedSheets->Delete; # This is not > correct > } # end of check on worksheets >my $MySaveLoc = $CleanUpLoc . "\\" . $JustFile; >$book->SaveAs( 'Filename' => $MySaveLoc , > 'FileFormat' => xlExcel5, 'Password'=>"", > 'WriteResPassword' =>"", > 'ReadOnlyRecommended' => 0, 'CreateBackup' => 0 ); >$book->Close; > > > Wags ;) > > > --__--__-- > > Message: 30 > From: [EMAIL PROTECTED] > To: [EMAIL PROTECTED] > Subject: An open complaint (was RE: An Index of Incivility in > the Perl Com > munity ) > Date: Mon, 11 Jun 2001 17:19:58 -0700 > > >From: "Lee Goddard" <[EMAIL PROTECTED]> > >To: <[EMAIL PROTECTED]> > >Subject: RE: An Index of Incivility in the Perl Community > >Date: Mon, 11 Jun 2001 11:49:29 +0100 > > > >FWIW > > > >Mostly hogswash. I learnt Perl from scratch without a book, and > >got all the help I needed from mailing lists and Usenet. Okay, > >I didn't ask anyone to complete my scripts or explain what an > >array is, but I'm not especially bright, just applied common sense. > > > >The very high number of lazy people asking questions they could > >themselves find answers to in the perldocs is a good enough reason > >to either ignore them or reply RTFM - or better, Go To > Learn.Perl.Org. > > Okay, folks. I seem to have found my "civility" breaking point. Look, > whether you like it or not we are always going to get those > questions that > lead one to spout out RTFM. I suggest, however, that we bite > our tongue and > answer the F'n question instead. > > > I don't know how many questions I have personally answered > because some poor > newbie came to me with his tail between his legs because he > was scolded by > the so called Perl gurus. If this is the attitude that we as > a community are > going to promote then I suppose I should pack it in right now. > I don't know why so many of us have this arrogant, "holier than thou" > attitude. Quite frankly it ticks me off. I dumped a crap load > of *unpaid* > time and effort to promote open software and this community. > I certainly did > not want to foster the pathetically low RTFM attitude. > What if everyone took your approach. The next time an > experienced coder > comes to me and asks what I deem a silly question I'll just > respond with > RTFSC (read the f'n source code). That ought to stop > everyone's questions > dead. Or how about RTFWAD (read the f'n Win32 API > documentation)? Where do > we draw the line. > > Ladies and gentlemen, I have better things to do with my time > than to feed > into a bunch of elitists. I do hope that we as a community > decide to come > bac
Question about NET::hostent
I have written a short script to take a text file and do lookups on the names to resolve them to IP addresses or vice versa. I am looking to streamline the code and look for ways to optomize it. If anyone would like to take a look and let me know any suggestions, I would be very appreciative. (Also, the script writes out to separate text files right now for debugging purposes and requires a fqdn.txt file to get its imput.) ## # Original code taken from CPAN Documentation for NET::hostent # # This script comes with NO WARRANTY at all. Use at your own risk. # # Any questions or suggestions, please e-mail me [EMAIL PROTECTED] # # Version 0.1 on 06.11.2001 by Josh Sidwell # # # # Currently, this script requires two seperate files. This is by design. # # fqdnEXAMPLE simply hold a few Fully Qualified Domain Names as an example and is# # only used if you do not have a fqdn.txt file in the same directory you are running # # resolve_0.1.pl. # ## use Net::hostent; use Socket; open(FQDN, "fqdn.txt") || &usage; # Text file with fully qualified domain namesto be resolved @fqdn = ; # Array to hold values from fqdn.txt file for resolving while (<@fqdn>) { # While loop to step through fqdn.txt values my (@work); my $VERSION = '0.1';# Version statement to track development # print "In fqdn while loop \n"; # print "This is Resolve.pl version $VERSION \n"; $work = $_; # Take current value from @fqdn to operate on open(fqdnRESOLVED, ">>fqdn.resolved.txt"); # Output file for resolved info on each value in fqdn.txt open(fqdnFAILED, ">>fqdn.failed.txt"); # Output file for failed info on each value in fqdn.txt print "$_ \n"; for $host ( $work ) { unless ($h = gethost($host)) { print fqdnFAILED "FAILED: $host not a valid fqdn. \n"; warn "$0: no such host: $host\n"; next; } printf fqdnRESOLVED "\n%s is %s%s\n", $host, lc($h->name) eq lc($host) ? "" : "*really* ", $h->name; print fqdnRESOLVED "\taliases are ", join(", ", @{$h->aliases}), "\n" if @{$h->aliases}; if ( @{$h->addr_list} > 1 ) { my $i; for $addr ( @{$h->addr_list} ) { printf fqdnRESOLVED "\taddr #%d is [%s]\n", $i++, inet_ntoa($addr); } # End for } else { printf fqdnRESOLVED "\taddress is [%s]\n", inet_ntoa($h->addr); } # End if else if ($h = gethostbyaddr($h->addr)) { if (lc($h->name) ne lc($host)) { printf fqdnRESOLVED "\tThat addr reverses to host %s!\n", $h->name; $host = $h->name; redo; } # End if } # End Parent if } # End for } # End While sub usage { open(fqdnEXAMPLE, "fqdnEXAMPLE.txt"); @fqdnEXAMPLE = ; print "Usage: RESOLVE.pl [you must have a fqdn.txt file with the names or ips you would like to resovle.] \n","Of the following format: \n", "\n", join("" , @fqdnEXAMPLE), "\n"; exit(0); } Joshua Sidwell Network Engineer Lockheed Martin IMS Network Services Division 1400 S. Grand Ave Santa Ana, CA 92705 (714) 796-8383 E-mail ~ [EMAIL PROTECTED] - Email Confidentiality Notice --- The information in this email may be confidential, proprietary and/or sensitive and is intended only for use by the entity or individual to whom it is addressed. If you, the reader of this email and/or its attachments, are not the intended recipient, you are hereby notified that any dissemination, distribution, publishing, modification, storage or copying of this email or any of its attachments is strictly prohibited. If you have received this communication in error, please immediately notify Lockheed Martin IMS at [EMAIL PROTECTED] and destroy all copies of this message along with any attachments. www.fa
how to list perl modules!!
Hi, I was trying to list all the perl modules that are installed on my machine (w.r.t a particular build). It is a freeBSD box. If there is a command that works on windows, i can probably use the same command on freeBSD. I was wondering if anybody could help me with this. regards, siva ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
Re: NET::SMS (uk) ??
Hi For SMS I use http://www.algonet.se/~mattem/homebrewn/mtsms-0.22.pl + http://www.mtnsms.com. I have sent message to Slovakia and UK without problem.You have to be registered of course. Marian > hi > > i downloaded the Net::SMS module (cant remember exact name), but only > after > this did i realise that it could only be used for US based mobile > networks , > > does anyone know of a module which can send SMS messages and can be used > for > UK based mobile networks?? > > > > waseem > > http://www.todayinsoccer.com - the ultimate soccer history site > > ___ > Perl-Win32-Users mailing list > [EMAIL PROTECTED] > http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users > ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
RE: format
> -Original Message- > Behalf Of Carlo Costa > > > sorry this is a stupid question but.. > can some one be so kind to explain me why this code is not working?? > > $str = "carlo"; > format stampa = > test: @<< > $str > . > write; > > I get this msg: > Missing right curly or square bracket at script line 4, at end of > linesyntax > error at script line 4, at EOF > Execution of script aborted due to compilation errors. > I would guess the problem is elsewhere in your code. Using perl 5.6.0 and replacing 'stampa' with STDOUT, the code fragment runs for me. ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
RE: Find && Grep
Thank you for all of your help getting the recursive directory walking portion. I have been trying to adapt a portion of active states documentation on 'study' to grep through the documents that are found using the script you sent (again, thank you), but I am having trouble getting it to work Am I going about this correctly. I need to return the file names from the array that is created in your script if the file contains an instance of an arbitrary keyword(s). E.g --> 'Human Resources', 'Jobs', 'Intra1', etc. I would prefer to serach for the keyword taken from a file with a setup similar to this: Open(KEYWORDS, "keys.txt"); @keys = ; Close(KEYWORDS); while (<@ips>) { () # I don't know how to do this portion } __BEGIN__ $search = 'while (<>) { study;'; foreach $word (@words) { $search .= "++\$seen{\$ARGV} if /\\b$word\\b/;\n"; } $search .= "}"; @ARGV = @files; undef $/; eval $search; # this screams $/ = "\n"; # put back to normal input delimiter foreach $file (sort keys(%seen)) { print $file, "\n"; } __END__ Any and all help is welcome. I have searched the documentation, but I do not know enough to really begin. I am pretty familiar with grep, but I am certainly not a wiz at writing regular expressions. Thanks, Joshua Sidwell Network Engineer Lockheed Martin IMS Network Services Division 1400 S. Grand Ave Santa Ana, CA 92705 (714) 796-8383 E-mail ~ [EMAIL PROTECTED] - Email Confidentiality Notice --- The information in this email may be confidential, proprietary and/or sensitive and is intended only for use by the entity or individual to whom it is addressed. If you, the reader of this email and/or its attachments, are not the intended recipient, you are hereby notified that any dissemination, distribution, publishing, modification, storage or copying of this email or any of its attachments is strictly prohibited. If you have received this communication in error, please immediately notify Lockheed Martin IMS at [EMAIL PROTECTED] and destroy all copies of this message along with any attachments. ::-Original Message- ::From: $Bill Luebkert [mailto:[EMAIL PROTECTED]] ::Sent: Friday, June 15, 2001 9:52 AM ::Cc: '[EMAIL PROTECTED]' ::Subject: Re: Find && Grep :: :: ::Walter Torres wrote: ::> ::> > -Original Message- ::> > From: [EMAIL PROTECTED] ::> > ::[mailto:[EMAIL PROTECTED]]On Behalf Of ::> > $Bill Luebkert ::> > Sent: Thursday, June 14, 2001 6:26 PM ::> > Cc: Sidwell, Josh; '[EMAIL PROTECTED]' ::> > Subject: Re: Find && Grep ::> > ::> > ::> > "$Bill Luebkert" wrote: ::> > ::> ::> Nice little piece Bill, but I have one question (maybe 2)... ::> ::> I don't see what this is looking for? :: ::html and asp files. :: ::> I see what it is NOT looking for. ::> ::> Does this look for text inside files? :: ::No. Missed that part in the orig post. You would have to ::open each of the files in @files and look for any text or use grep ::system call before accumulating into @files or ??? :: ::> Does this look for certain file names? :: ::Yes. .html, .htm, .asp :: ::> Thanks ::> ::> Walter ::> ::> > ::> > Tested: ::> > ::> > use strict; ::> > use File::Find; ::> > ::> > my @files = (); # Array to hold resulting files ::> > my $rootdir = 'c:/temp';# Start here in this directory ::> > ::> > find (\&wanted, $rootdir); # Examine the files ::> > ::> > foreach (@files) { # print list ::> > print "$_\n"; ::> > } ::> > exit 0; ::> > ::> > sub wanted ::> > { ::> ># skip files not wanted and non-plain files ::> >return if not /\.(html|htm|asp)$/i or not -f $_; ::> ># Append path ::> >push @files, $File::Find::name; ::> >(use $_ for just filename) ::> > } ::> > __END__ :: :: ::-- :: ,-/- __ _ _ $Bill Luebkert ICQ=14439852 :: (_/ / )// // DBE Collectibles Mailto:[EMAIL PROTECTED] :: / ) /--< o // // http://dbecoll.webjump.com/ (Free Perl site) ::-/-' /___/_<_http://www.todbe.com/ ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
Re: Strange Question? Is compiler fault?
> From: "cloud" <[EMAIL PROTECTED]> > To: "Paul G. Weiss" <[EMAIL PROTECTED]> > Cc: "'[EMAIL PROTECTED]'" > <[EMAIL PROTECTED]> > Subject: Re: Strange Question? Is compiler fault? > Date: Fri, 15 Jun 2001 11:59:36 +0800 > > > although $i = $i run before $i++, But > the increment should be work, so $i should be 1, isn't it? > > - Original Message - > From: "Paul G. Weiss" <[EMAIL PROTECTED]> > To: "cloud" <[EMAIL PROTECTED]> > Cc: "'[EMAIL PROTECTED]'" > <[EMAIL PROTECTED]> > Sent: Friday, June 15, 2001 11:42 AM > Subject: Re: Strange Question? Is compiler fault? > > > > The expression $i++ has the *effect* of incrementing $i > > but its *value* is the value of $i before the increment. > > > > So the assignment > > > > $i = $i++; > > > > is a no-op, because you are assigning to $i the value that > > it had before the increment. > > > > -Paul > > > > > > > > > > On Fri, 15 Jun 2001, cloud wrote: > > > > > All: > > > > > > I excute follow code & got some Strange result, > > > Why? Why $i = 0 > > > === > > > $i = 0; > > > $i = $i++; > > > print "$i\n"; > > > === > > > > > > > > > ___ > > > Perl-Win32-Users mailing list > > > [EMAIL PROTECTED] > > > http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users > > > I thought for sure that about 9 months ago I heard some discusion on this list about the autoincrement operator not having any difinative order. Basically, from what I remember, the thread ended up saying not to rely on the value being either changed or unchanged if you use the var on the same line for some other reason. Does anyone else rememever that? ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
Re: Help needed converting form textarea data into an html table
Thanks. That did the trick! On Wed, 13 Jun 2001, $Bill Luebkert wrote: > Gary Nielson wrote: > > > > I am having trouble figuring out how to turn the contents from a form > > textarea into an html table. > > > > First, I am splitting into an array the contents of a data file and doing > > some manipulation of the text. ('' equals one because normally > > when typing in this textarea, we need to know how to break up > > paragraphs.): > > > > 992451492:^06/13/2001 11:58:^Middle School Boys Soccer:^Tue, Mar > > 21North Kannapolishome54/37 winThr Apr 2Mount > > Pleasantaway72/86 winSat, Apr 3First Assembly, > > Concordhome9:00 a.m.Tue, Apr 9Forsyth Country > > Dayaway4 pm > > > > my ($self, $articleNumber) = @_; > > open(SPORTS, > > "/webServer/virtualDW/cannonschool.org/cgi-bin/newsEdit2/newsInfo.txt"); > > my (@sportsInfo); > > @sports = ; > > close(SPORTS); > > > >foreach $line (@sports){ > > ($uid, $date, $headLine, $article) = split(/\:\^/,$line); > > if ($articleNumber == $uid) { > > $article =~ s///g; > > } > > } > > > > Then I hope to use the to convert the contents of $article into a > > table. I am having trouble converting a scalar variable into an array and > > then using something like "foreach $line". I can not get the new > > array to break the into a new line, as in: > > > >print OUT "$headLine\n"; > >print OUT "\n"; > >@array = $article; > >@array =~ s//\n/ig; > > Replace the 2 lines above with: > > @array = split //, $article; > > Then just make sure you add a newline when you print each line if needed. > > > >foreach $line (@array) { > > ($date, $opponent, $location, $time_score) = split(/\:\^/,$line); > > Shouldn't this be splitting on instead of :^ ? > > > print OUT >"$date$opponent$location$time_score\n"; > > } > > > > print OUT "\n"; > > > > Perl is seeing the entire array as one line and only presents in tabular > > format the contents of one entry within the $article: > > > > > > Middle School Boys Soccer > > > > Tue, Mar 21North Kannapolishome54/37 > > win > > > > Thr Apr 2 > > > > > > Any help, advice, guidance appreciated. Thank you. > > > -- Gary Nielson [EMAIL PROTECTED] ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
Re: Find && Grep
Walter Torres wrote: > > > -Original Message- > > From: [EMAIL PROTECTED] > > [mailto:[EMAIL PROTECTED]]On Behalf Of > > $Bill Luebkert > > Sent: Thursday, June 14, 2001 6:26 PM > > Cc: Sidwell, Josh; '[EMAIL PROTECTED]' > > Subject: Re: Find && Grep > > > > > > "$Bill Luebkert" wrote: > > > > Nice little piece Bill, but I have one question (maybe 2)... > > I don't see what this is looking for? html and asp files. > I see what it is NOT looking for. > > Does this look for text inside files? No. Missed that part in the orig post. You would have to open each of the files in @files and look for any text or use grep system call before accumulating into @files or ??? > Does this look for certain file names? Yes. .html, .htm, .asp > Thanks > > Walter > > > > > Tested: > > > > use strict; > > use File::Find; > > > > my @files = (); # Array to hold resulting files > > my $rootdir = 'c:/temp';# Start here in this directory > > > > find (\&wanted, $rootdir); # Examine the files > > > > foreach (@files) { # print list > > print "$_\n"; > > } > > exit 0; > > > > sub wanted > > { > ># skip files not wanted and non-plain files > >return if not /\.(html|htm|asp)$/i or not -f $_; > ># Append path > >push @files, $File::Find::name; > >(use $_ for just filename) > > } > > __END__ -- ,-/- __ _ _ $Bill Luebkert ICQ=14439852 (_/ / )// // DBE Collectibles Mailto:[EMAIL PROTECTED] / ) /--< o // // http://dbecoll.webjump.com/ (Free Perl site) -/-' /___/_<_http://www.todbe.com/ ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
Re: HELP to unsubscribe
Have you tried going to this link that is at the bottom of every message? http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users "Jimmy S. Lim" wrote: > can anybody help me on how to unsubscribe from this list pls.? i tried > sending to this list w/ the subject and body of "unsubscribe". but i'm still > subscribed! > pls. help! > > ___ > Perl-Win32-Users mailing list > [EMAIL PROTECTED] > http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users -- Vince Wilding (Splotch, Fuzzee & Minnie's Majordomo) email:Vince (at) VinceWilding.com http://www.VinceWilding.com Human (n): Useful domestic animal popular with cats. ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
RE: HELP to unsubscribe
Try this: Go to www.ActiveState.com, ActivePerl, Support, Mailing List, and there should be stuff there to let you unsubscribe. Merrill -Original Message- From: Jimmy S. Lim [mailto:[EMAIL PROTECTED]] Sent: Friday, June 15, 2001 9:41 AM To: [EMAIL PROTECTED]; 'dbi ' Subject: HELP to unsubscribe can anybody help me on how to unsubscribe from this list pls.? i tried sending to this list w/ the subject and body of "unsubscribe". but i'm still subscribed! pls. help! ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
HELP to unsubscribe
can anybody help me on how to unsubscribe from this list pls.? i tried sending to this list w/ the subject and body of "unsubscribe". but i'm still subscribed! pls. help! ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
RE: Re: Perl and Javascript
You would just use some Javascript such as the following : document...value = where is the NAME attribute of your tag, is the NAME attribute of your form field and is the value that you are trying to assign to it, in this case your users entered data. > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: 14 June 2001 19:04 > To: [EMAIL PROTECTED]; [EMAIL PROTECTED]; > [EMAIL PROTECTED] > Subject: Re: Re: Perl and Javascript > > > How are you doing that? > > Mark Bergeron > > -Original Message- > From: [EMAIL PROTECTED] > To: [EMAIL PROTECTED], [EMAIL PROTECTED] > Date: Thu Jun 14 10:59:51 PDT 2001 > Subject: Re: Perl and Javascript > > >What I've had luck doing is setting the value of an INPUT > type field on the form (hidden or not) with the JavaScript > and then I can pass that value on as a normal 'param'. > > > >Stanley G. Martin > >Midwest Consulting Group > >Sprint Platform & Strategy Mgmt > >913.315.3133 > >[EMAIL PROTECTED] > > > > -Original Message- > >From:Eric.Gargantiel [mailto:[EMAIL PROTECTED]] > >Sent:Thursday, June 14, 2001 12:47 PM > >To: perl-win32-users > >Cc: Eric.Gargantiel > >Subject: Perl and Javascript > > > >Hello, > > I've been working with HTML embedded in PERL scripts. I > came upon a > >situation where I would like to use a javascript prompt that > would ask for > >data, say a "name". In which case, I would then use that piece of > >information as a parameter to run another script. I've been > having problems > >exporting the value in a javascript variable back to the > actual PERL portion > >so I can use it again later. If anyone could please provide > me with an > >example of such, i would greatly appreciate it. > > Thanks in advance. > > > >Erick > > > > > > > > > >___ > >Perl-Win32-Users mailing list > >[EMAIL PROTECTED] > >http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users > > /~_. _ | _ _ _ _ > \_/|(_||| | |(_)| | > _| > ___ > GO.com Mail > Get Your Free, Private E-mail at http://mail.go.com > > > ___ > Perl-Win32-Users mailing list > [EMAIL PROTECTED] > http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users > ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users