Re: ActiveState unauthorized license claims?

2019-05-31 Thread Michael Putch
On Fri, May 31, 2019 at 12:44 PM wrote: > > I would suggest posting this to the Perl 5 Porters list; it’s probably > > the best venue to get an answer to your question. > > > > https://lists.perl.org/list/perl5-porters.html > > Thanks for the hint although the description "people interested in Pe

FW: Question about Beginning Perl by Simon Cozens

2016-09-01 Thread Walker, Michael E
From: Walker, Michael E Sent: Thursday, September 01, 2016 12:47 PM To: 'Aaron Wells' Subject: RE: Question about Beginning Perl by Simon Cozens Thank you all for sharing your perspective on this. I will compare both the first and second editions of Beginning Perl. Cozens’ writing st

Question about Beginning Perl by Simon Cozens

2016-09-01 Thread Walker, Michael E
Hi, even though Beginning Perl dates back to 2000, is it still relevant for learning today? I wondered, because when Googling, I saw posts recommending against its use, but yet it is still listed at books.perl.org. Please discuss, or point me to the archive on this list where this has been discu

RE: Start a New Thread for a New Question (WAS: This is one of the things ...)

2016-05-13 Thread Walker, Michael E
"Walker, Michael E" wrote: > Hi, > > What framework are you all using for database development? When > tracking this thread back to the original message, I thought, "Nice > syntax." I am overall new to Perl, but am learning it for ETL at work. > > Than

RE: This is one of the things ...

2016-05-13 Thread Walker, Michael E
Hi, What framework are you all using for database development? When tracking this thread back to the original message, I thought, "Nice syntax." I am overall new to Perl, but am learning it for ETL at work. Thanks, Mike -Original Message- From: Shawn H Corey [mailto:shawnhco...@gmail.c

Re: Apologetic request for simple one-off script

2014-07-17 Thread Michael Lynch
how about using awk to print the last column, using number of columns variable $NF: awk '{print $NF}' file Regards, Mike On Sun, Jul 13, 2014 at 4:43 PM, ESChamp wrote: > I apologize for having to ask this but my nearly-80-year-old brain just > could not come up with a solution. > > I have a

Re: Can't find perldoc in Cygwin

2013-11-17 Thread Michael Brader
Hi Juan, see below: On 11/18/2013 10:45 AM, Juan Wei wrote: Michael, Please send questions to the list. I'm not a private support channel and you will likely find more help faster there. I have the Cywin version of perl installed on a Windows 7 computer, and it does not have a pe

Re: Reading a sequence data from a file

2013-11-12 Thread Michael Brader
, and try and write some code that solves your problem. If you have further trouble, feel free to email the list including the code you have tried and I or others here will be more than happy to assist. Good luck, Michael On 11/13/2013 07:45 AM, Alaba, Oluwafemi (IITA) wrote: Dear Michael, Thanks

Re: Reading a sequence data from a file

2013-11-11 Thread Michael Brader
return value of system calls such as close. It's unlikely after reading but a big problem after writing: close $PROTEINFILE or warn "Problem closing protein file $proteinfilename. Reason: $!"; Cheers, Michael -- Michael BraderSenior Software Engineer a

Re: Test automation using perl or shell

2013-09-10 Thread Michael Rasmussen
use warnings; foreach my $test (@ARGV) { system "./$test"; } -- Michael Rasmussen, Portland Oregon Be Appropriate && Follow Your Curiosity Other Adventures: http://www.jamhome.us/ or http://gplus.to/MichaelRpdx A special random fortune co

Re: Dealing with apache timeout in Perl

2013-09-04 Thread Michael Brader
dically refresh the results page until the zip is available. This isn't really a Perl question, so if you need further help, you might want to ask it in a forum devoted to web development. Cheers, Michael On 09/05/2013 01:25 PM, Chankey Pathak wrote: Sorry I can't do that. Isn&#x

Re: Filtering Characters

2013-09-03 Thread Michael Rasmussen
aracters. How > >would I do that? > > The solution from John Krahn is superior by far, and there is no need for any > other suggestions. John's solution: next if /[^[:lower:]_\d\-. ]/; Doesn't work in this test environment: michael@bivy:~$ cat tpl && .

Re: Print to several logs

2013-08-27 Thread Michael Brader
mplate, $template, \$log4perl_cfg ) || die 'Template error: ' . $tt->error(); # Comment or remove this line once you are happy with the generated config print "CONFIG: $log4perl_cfg\n"; Log::Log4perl->init( \$log4perl_cfg ); my $logger = get_logger('main'); my $rs

Re: Array iterator count

2013-08-10 Thread Michael Rasmussen
nter or was asking if there was an automagic indicator. This example shows one reason why a counter isn't a bad thing. -- Michael Rasmussen, Portland Oregon Be Appropriate && Follow Your Curiosity Other Adventures: http://www.jamhome.us/ or http://gplus.to

Re: Array iterator count

2013-08-10 Thread Michael Rasmussen
a list > my @letters = (a .. z); > foreach my $letter ( a .. z ) { >if ( $letter eq $letters[4] ) { > > but that's sort of silly. And buggy, consider: my @timings ( 11, 22, 3, 14, 18, 45, 18, ... 86 ); -- Michael Rasmussen, Portland Oregon

Re: using join

2013-08-04 Thread Michael Rasmussen
(#lines are commented out) Limit what join acts on by using parenthesis. print '[', join ( '][', @fruits ), ']'; This keeps your closing bracket from being part of the list that join is acting upon. -- Michael Rasmussen, Portland Oregon B

Re: Convert any date format to ISO

2013-07-27 Thread Michael Brader
On 07/26/2013 06:10 AM, Charles DeRykus wrote: On Wed, Jul 24, 2013 at 10:56 PM, Michael Brader mailto:mbra...@internode.com.au>> wrote: [...] There are at least 2 modules that can definitely do the job for you, Date::Manip::Date and DateTime (with DateTime::Format::Natur

Re: Convert any date format to ISO

2013-07-24 Thread Michael Brader
. For example, the code above will happily turn '99-99-2013' into '2013-99-99'. Cheers, Michael -- Michael BraderSenior Software Engineer and Perl Person Our World Wide Web has a World Wide Network Technology/Softdev/DevOps Internode http://intern

Re: Convert any date format to ISO

2013-07-24 Thread Michael Brader
. Cheers, Michael -- Michael BraderSenior Software Engineer and Perl Person Our World Wide Web has a World Wide Network Technology/Softdev/DevOps Internode http://internode.on.net/ mbra...@internode.com.au iiNet http://iinet.net.au/

Re: Parsing Data

2013-07-22 Thread Michael Brader
would love to wrap this up so I can transfer my contacts to my new address book. Thanks again to all. my $url = $item->findvalue('a[@class="lnk-store-item"]/@href'); See an XPath reference for why. And go to bed! Cheers, Michael -- Michael BraderS

Re: modules

2013-06-03 Thread Michael Rasmussen
what it really is. Generically: use ; # code that calls on the modules functions or OO interfaces as documented. -- Michael Rasmussen, Portland Oregon Be Appropriate && Follow Your Curiosity Other Adventures: http://www.jamhome.us/ or http://gplus.to/

Re: Perl and Web Development

2013-06-03 Thread Michael Rasmussen
ything I've been trying to search for seems dated (2005 and earlier). > >> > >> > I'll second Catalyst. Start simple, and it's pretty easy to learn. > > http://www.catalystframework.org/ And I'll second Dancer, simplier, quicker to learn, plenty power

Re: Scripts in Padre do not run. Need step-by-step help in setting up, asall current procedures I have found have failed for me.

2013-05-26 Thread Michael Rasmussen
On Sat, May 25, 2013 at 04:19:27PM +0200, Dr.Ruud wrote: > On 24/05/2013 22:25, Michael Goldsbie wrote: > >> [...] I installed DWIM Perl [...] >> So after downloading and installing it, what's the next step? > > On http://dwimperl.com/ there is a link to 'Per

Re: Next subnet

2013-05-26 Thread Michael Rasmussen
->$type ) { print "$type : ", $ip->$type(), $/; } else { print "no more $type\n"; } } } __END__ michael@bivy:~/rmme$ ./tpl Start ip [192.168.0.0] start mask [24] After incrementing by 1 now at 192.168.0.1 ip : 192.168.0.1 short : 192

Re: Scripts in Padre do not run. Need step-by-step help in setting up, as all current procedures I have found have failed for me.

2013-05-24 Thread Michael Goldsbie
, 2013 at 4:58 PM, Michael Goldsbie < michael.golds...@alum.utoronto.ca> wrote: > There is, yes, and thank you for telling me about it. However, still, > nothing happens when I choose Run Script. I am guessing some components > are not correctly installed or something. > > &

Re: Scripts in Padre do not run. Need step-by-step help in setting up, as all current procedures I have found have failed for me.

2013-05-24 Thread Michael Goldsbie
There is, yes, and thank you for telling me about it. However, still, nothing happens when I choose Run Script. I am guessing some components are not correctly installed or something. On Fri, May 24, 2013 at 4:50 PM, Robert Wohlfarth wrote: > On Fri, May 24, 2013 at 3:25 PM, Michael Golds

Scripts in Padre do not run. Need step-by-step help in setting up, as all current procedures I have found have failed for me.

2013-05-24 Thread Michael Goldsbie
*NOTE: To skip directly to the problem itself, skip to the bolded text below. However, I thought I would give some background context first.* Hi, My name is Michael, and I am trying to get into Perl. While I have Ubuntu Linux installed on my computer, my default environment is Windows 7, and

Re: Any alternative for substr() function

2013-04-12 Thread Michael Rasmussen
asked what kind of hardware you're running this on, so I will. Reading the thread, I created a very simplistic test: michael@post:~$ wc -l /var/log/mail.info 973819 /var/log/mail.info michael@post:~$ time perl -ne '$t = substr $_, 4, 9; $s = substr $_, 11, 15; print $t,$

Re: obfuscating code

2013-02-12 Thread Michael Smith
I don't know if he was speaking of making the code you can see hard to understand (like some sigs I've seen) or keeping others, online perhaps, from the seeing the code (like object code). You can of course "see" object code but you would have to be able to read machine code, in hex, and most do

Re: getting perl to open pl file extension in XP

2013-02-02 Thread Michael Smith
adable Everyone Thanks you very much for all the responses. ms ____ From: timothy adigun <2teezp...@gmail.com> To: Michael Smith Cc: "beginners@perl.org" Sent: Saturday, February 2, 2013 11:40 AM Subject: Re: getting perl to open pl file extension in XP

getting perl to open pl file extension in XP

2013-02-02 Thread Michael Smith
I know get a new OS :) First I installed strawberry perl but it has no GUItest and I couldn't get guitest to install. Then I deleted strawberry and I installed padre-on-strawberry because it says it already contains GUItest and now I can't get anything but notepad to open the pl files. I have t

Re: jsFiddle

2013-01-15 Thread Michael Dabydeen
@perl.org > For additional commands, e-mail: beginners-h...@perl.org > http://learn.perl.org/ > > > -- Regards, *Michael Dabydeen * * * *Telephone (M)*: 647-389-2286 *Web:* http://about.me/mikedabydeen ---

Re: What is the difference between () and [] syntax for array?

2013-01-07 Thread Michael Brader
illustrate the difference: #!/usr/bin/perl use strict; use warnings; use Data::Dumper qw/ Dumper /;; my @a1 = ( 1, 2, 3 ); print '@a1: ' . Dumper(\@a1); my @a2 = [ 1, 2, 3 ]; print '@a2: ' . Dumper(\@a2); Cheers, Michael -- Michael Brader

Re: regular expression help

2012-09-20 Thread Michael Brader
ings; use File::Spec; # for splitpath my $path = 'c:\p4\car\abc\xyz.csproj'; my ( $volume, $directories, $file) = File::Spec->splitpath( $path ); print <<"EOINFO"; Volume: $volume Directories: $directories File: $file EOINFO exit 0; __END__ Cheers, Michael --

Re: How to set ">" as record separator in a Perl one liner?

2012-07-16 Thread Michael Brader
#x27; 76 Now perl will leave the input record separator on the string, but we can take that off with chop: echo '>>' | perl -0076 -nE 'chop,say if /AAAA/' TIMTOWTDI of course, and you could also do it like this: echo '>>' | p

Re: Something mojolicious

2012-07-05 Thread Michael Greb
On Thu, Jul 5, 2012 at 6:19 AM, lina wrote: > PORT STATESERVICE > 3000/tcp filtered ppp This should show state 'open'. Do you have a firewall configured that would be blocking this? 'iptables -L -vn' output will show this. Mike -- To unsubscribe, e-mail: beginners-unsubscr...@perl.or

Re: How to create a user manual window

2012-06-12 Thread Michael Putch
I hate when I do that. :(This email contains my actual comments (see below). On Tue, Jun 12, 2012 at 9:50 AM, Bob McConnell wrote: > > From: Paul Johnson > > > > On Tue, Jun 12, 2012 at 07:11:57PM +0300, Shlomi Fish wrote: > > > > > OK. For Windows there is now http://dwimperl.com/ which

Re: How to create a user manual window

2012-06-12 Thread Michael Putch
On Tue, Jun 12, 2012 at 9:50 AM, Bob McConnell wrote: > > From: Paul Johnson > > > > On Tue, Jun 12, 2012 at 07:11:57PM +0300, Shlomi Fish wrote: > > > > > OK. For Windows there is now http://dwimperl.com/ which is open-source > > and is > > > considered better than Activestate Perl. > > > > [cit

RE: Bareword and strict subs

2012-05-31 Thread Michael Brader
rds and 'perldoc strict' for more info on what "use strict 'subs' forbids and allows. Cheers, Michael Michael Brader Senior Software Engineer - Billing Techops - Softdev Internode http://www.internode.on.net/ From: Mark Haney [ma

Re: Help required to extract multiple text fields from a text string

2012-05-27 Thread Michael Rasmussen
On Sun, May 27, 2012 at 07:24:26PM -0700, John W. Krahn wrote: > Michael Rasmussen wrote: >> [ a bunch of blather, snipped here ] > > The regular expression is not splitting! It is capturing. > split removes whitespace. > The regular expression captures non-whitespace. >

Re: Help required to extract multiple text fields from a text string

2012-05-27 Thread Michael Rasmussen
$str .= ' ' x (rand 10 + 1); $str .= ","; # change the /\S+/ to /,/ Rate regex split regex 63021/s-- -8% split 68790/s9%-- Perhaps the lesson is split on whitespace else regex -- Michael Rasmussen, Portland Oregon Other Adve

RE: Getopt::Long

2012-05-16 Thread Michael Brader
abc) { print "You have choosen \"abc\" as $abc" }; # == If you don't have List::MoreUtils installed and can't install it, replace the 'if ( any...)' block with: foreach my $arg (@ARGV) { if ( $arg eq '-help' ) { $help = 1;

Re: how to display commands while perl script executing

2012-05-15 Thread Michael Rasmussen
ghtforward way to do this is to run your script with the perl debugger: perl -d script_name When it loads you'll see something like: michael@bivy:~$ perl -d tpl Loading DB routines from perl5db.pl version 1.32 Editor support available. Enter h or `h h' for hel

Re: Can't find string terminator

2012-05-09 Thread Michael Brader
s-enclosed-by='"' --fields-terminated-by='|'} ); Cheers, Michael On 05/10/2012 11:32 AM, Alvin Ramos wrote: Have a simple perl script that will run a mysql dump, but I'm getting Can't find string terminator '"' anywhere before EOF at ./ssh.pl l

Re: Template toolkit issue [SOLVED] - mod_perl hosting

2012-05-06 Thread Michael Rasmussen
w if there are any. There are a few, the largest being pair Networks. http://perl.apache.org/help/isps.html -- Michael Rasmussen, Portland Oregon Other Adventures: http://www.jamhome.us/ or http://westy.saunter.us/ Fortune Cookie Fortune du courrier: The best book on progr

Re: Recommended config/ini file module?

2012-05-03 Thread Michael Rasmussen
On 2012-05-01 06:43, Manfred Lotz wrote: On Tue, 1 May 2012 05:57:28 -0700 Michael Rasmussen wrote: On Tue, May 01, 2012 at 11:58:46AM +0200, Manfred Lotz wrote: > Hi there, > What is a recommended Module for processing config resp. inifile > formats? > > One important featu

Re: Recommended config/ini file module?

2012-05-01 Thread Michael Rasmussen
our comments in addition to your previously defined entries. I've found it to be a very easy to use module. -- Michael Rasmussen, Portland Oregon Other Adventures: http://www.jamhome.us/ or http://westy.saunter.us/ Fortune Cookie Fortune du courrier: Dicipline is making the

Re: Problem with unless statement

2012-04-28 Thread Michael Rasmussen
d) and ($mail_field ne '') ) { >>> $host = $mail_field; >>> } >> >> I would use: >> >> my $host = $mail_field ? $mail_field : 'localhost' ; >> >> > > Well, since $mail_field is not likely to be false unless it's undef

Re: PERL CGI, HTML and PHP

2012-04-26 Thread Michael Rasmussen
ay I've come up with is to simply output the report data to > disk as an HTML file and then include that output in a PHP page that is > correctly formatted. Again, you haven't described why Perl can't create the same HTML the PHP does. -- Michael Rasmuss

Re: Merging multiple strings

2012-04-25 Thread Michael Rasmussen
Before Due Date: 06/15/12 0 06/15/12 Clean up and elegence left as an exercise for the reader -- Michael Rasmussen, Portland Oregon Other Adventures: http://www.jamhome.us/ or http:/

Re: Seek string to time module

2012-04-24 Thread Michael Rasmussen
makes sense. You're looking for Date::Calc... wait _time_ Time::Format? Time::Tiny has a from_string function that looks like what you're after. Is that what you're looking for? -- Michael Rasmussen http://www.jamhome.us/ Be Appropriate && Follow Your Curiosit

Re: Net::SMTP

2012-04-24 Thread Michael Rasmussen
gt; going for IO or Sockets.. > I want to make it work. > Please, I need some workable parameters. Help. > And it dies, simply. Don't know what goes on beneath the surface... > > > On Tue, Apr 24, 2012 at 6:26 AM, Michael Rasmussen >wrote: > >> On Tue, Ap

Re: Net::SMTP

2012-04-23 Thread Michael Rasmussen
to know any mailhost's address??? most programs/people ask the DNS system to return the mail host for any given domain. > Its irritating when you fail on the first step. Yes it's irritating. What is your objective? To learn about SMTP and Perl or to just send some mail? If &quo

Re: & and subroutine

2012-04-17 Thread Michael Rasmussen
e entire chapter on subroutines, including the many reasons to prefer () to & is online: http://www.devshed.com/c/a/Perl/Subroutines-in-Perl/ -- Michael Rasmussen, Portland Oregon Other Adventures: http://www.jamhome.us/ or http://westy.saunter.us/ Fortune Cookie F

Re: & and subroutine

2012-04-17 Thread Michael Rasmussen
cution of ./testsub.pl aborted due to compilation errors. Alternatively, and to my sensibilities cleaner: #!/usr/bin/perl use strict; use warnings; sub mysub; # declares it, mysub no longer a bareword mysub();# does it, () not required for Perl parser, but are nice for maintainers

Re: Regex again..

2012-04-14 Thread Michael Rasmussen
. The commentors add more examples. Somu, I believe this is what you've been asking for. On Sat, Apr 14, 2012 at 09:44:59AM -0700, Michael Rasmussen wrote: > On Sat, Apr 14, 2012 at 07:05:54PM +0300, Shlomi Fish wrote: > > Hi Somu, > > > > On Sat, 14 Apr 2012 21:0

Re: Regex again..

2012-04-14 Thread Michael Rasmussen
tarian hair brush to can of paint To a greater or lessor degree you might try to use one for the purpose but it's not the right tool for the job. -- Michael Rasmussen, Portland Oregon Other Adventures: http://www.jamhome.us/ or http://westy.saunter.us/ Fortune Cookie

Re: How Can I find all kinds of methods a Object support?

2012-04-12 Thread Michael Rasmussen
u need to assign the return of Class::Inspector->methods to a scalar and later defererence the reference. You could make these changes: my $methods = Class::Inspector->methods('IO::File', 'full', 'public'); print @$methods; # consider print join $/, @$met

Re: Help parsing tab delimited files

2012-04-08 Thread Michael Rasmussen
ue estoy amando > > Gracias a la vida que me ha dado tanto > Me ha dado la marcha de mis pies cansados > Con ellos anduve ciudades y charcos > Playas y desiertos, montañas y llanos > Y la casa tuya, tu calle y tu patio" > > Vioeta Parra - Gracias a la Vida > >

Re: Why do I get a warning?

2012-03-22 Thread Michael Putch
On 3/22/2012 3:47 PM, Manfred Lotz wrote: Hi all, If I run the following small test snippet <--snip> #! /usr/bin/perl use strict; use warnings; use autodie; open my $hdl, ">", "fileio1.txt"; print $hdl "a line\n"; close $hdl; open HDL, ">", "

Testing for Missing Packages

2011-12-24 Thread Eric James Michael Ritz
Hello everyone. Here is my question: What is the preferred way to test a system for installed modules? For example, I have a Perl program I would like to distribute. It depends on a number of modules from CPAN and I would like an easy way to test for the existence of those modules. I suppose t

Re: whats the purpose of use Data::Dumper;

2011-06-01 Thread Michael Greb
27;baz' => 'biz', 'foo' => 'bar'   },   'two',   { 'c' => [  'one',  'two',  'three'    ], 'a' => 'b'   } ]; --- END -- Hopefully this is useful. Mike -- Michael mich...@thegrebs.com M: +1-562-MIKEGRB -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: Conversion program decimal to hex and oct using assertions

2011-05-30 Thread Michael Greb
f format string, the sample code you showed used '%0' the number. -- Michael mich...@thegrebs.com M: +1-562-MIKEGRB -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: CGI.pm and scrolling list box code error

2011-05-30 Thread Michael Greb
e=>254); This should do what you want, when you use '@terms' the array gets expanded to the list of items in the array, the backslash causes a reference to the array to be passed instead. The relevant documentation is perlref <http://perldoc.perl.org/perlref.html#Making-References&

RE: About the Perl multiple lines problem

2010-01-13 Thread Grove, Michael
At 6:47 PM +0800 1/13/10, Majian wrote: >Hi,all > >There is a problem confused me for a long time . >It is: > >cat test.txt > >1, >2, >3, >4, >5, >6, >7, >8, >9, >10, >11, > > > >Then I want to this result : >1 2 3 6 9 >4 7 10 >

RE: Weird CGI.pm issue

2010-01-08 Thread Grove, Michael
param( 'POSTDATA' ); ADD 6ec973aa3f7a96e43f86b8d2aea0585ba3096c28 5551313 SMS 15551212 Test message sent from script %%DNAME%% %\xdaTE%% ALERT ADD 6ec973aa3f7a96e43f86b8d2aea0585ba3096c28 5551313 SMS 15551212 Test message sent from script %%DNAME%% %%DATE%% ALERT http://learn.pe

RE: double quotes are needed

2010-01-06 Thread Grove, Michael
e- From: Shlomi Fish [mailto:shlo...@iglu.org.il] Sent: Wednesday, January 06, 2010 1:48 PM To: beginners@perl.org Cc: Grove, Michael Subject: Re: double quotes are needed On Wednesday 06 Jan 2010 20:38:29 Grove, Michael wrote: > Thanks. > > Is this better? > > print "$first

RE: double quotes are needed

2010-01-06 Thread Grove, Michael
mp; Industry 651 Boas Street Room 124 | Harrisburg, PA 17121 Phone: 717-705-2724 | Fax: 717-783-6364 AIX Hot Line 717-525-5598 | AIX Cell 717-329-0502 -Original Message- From: Shlomi Fish [mailto:shlo...@iglu.org.il] Sent: Wednesday, January 06, 2010 1:48 PM To: beginners@perl.org Cc: Gr

RE: double quotes are needed

2010-01-06 Thread Grove, Michael
ot Line 717-525-5598 | AIX Cell 717-329-0502 -Original Message- From: Shlomi Fish [mailto:shlo...@iglu.org.il] Sent: Wednesday, January 06, 2010 1:48 PM To: beginners@perl.org Cc: Grove, Michael Subject: Re: double quotes are needed On Wednesday 06 Jan 2010 20:38:29 Grove, Michael wrote

RE: double quotes are needed

2010-01-06 Thread Grove, Michael
-Original Message- From: Shlomi Fish [mailto:shlo...@iglu.org.il] Sent: Wednesday, January 06, 2010 12:45 PM To: beginners@perl.org Cc: Grove, Michael Subject: Re: double quotes are needed Hi Mike! On Wednesday 06 Jan 2010 19:27:59 Grove, Michael wrote: > Can someone tell me why I need double

double quotes are needed

2010-01-06 Thread Grove, Michael
Can someone tell me why I need double quotes for this to work at the line with: print $first, $second, $third\n; #!/usr/bin/perl -w $first = 0xFF; $second = 0377; $third = 0b; print $first, $second, $third\n; $answer = $first + $second + $third; print "$answer\n"; It only gives this out

Re: the classic "which is the fastest way to sort" question

2009-11-09 Thread Michael Alipio
Hi,   > >  Do you need the fastest possible sort? I'm not even sure if I really need to worry about all these sorting techniques. My program just reads a text file (wordlist). It might be megabyte-sized or probably few gigabytes (i might also add size checking on this to be safe with File::Sl

the classic "which is the fastest way to sort" question

2009-11-09 Thread Michael Alipio
Hi, i'm planning to sort an input file (which was File::Slurp'ed, most likely megabyte-sized file) in various ways. I did some readings and learned several methods that people have come up with in recent years. So to summarize, the default sort is fast (uses quick sort), explicit (using sub) is

must satisfy _unknown_ number of regexp patterns

2009-11-05 Thread Michael Alipio
Hi, if I have a script that accepts any combination of the 5 or maybe even more options, say, option1, option2, option3... Now, after collecting the options, for each option, there is a corresponding regexp pattern. I will then build an if statement, where the test should be, all the options

Re: AW: compact my wordlist generator

2009-10-26 Thread Michael Alipio
last is the length. The above line is too cryptic for me. What confused me more is that the return value of substr was assigned the $_. If someone can help me decipher each line, i'll be very happy. --- On Mon, 10/26/09, Thomas Bätzler wrote: > From: Thomas Bätzler > Subject: AW

Re: compact my wordlist generator

2009-10-26 Thread Michael Alipio
hi, I have this code, mentioned below: my @word = qw(a b c ); my $length = @word; my $char1, $char2, $char3; if ($length == 3){ for ($char1 = 0; $char1<$len;$char1++){ for ($char2 = 0; $char2<$len;$char2++){ for ($char3 = 0; $char3<$len;$char3++){ print "$word[$char1]$word[$char2]$word[$c

split n characters into n chunks

2009-10-25 Thread Michael Alipio
Hi, How do I split a word into n subsets? my $word = "thequickbrown" If I want three subsets I should be able to create: the heq equ upto own Using split function with limit of 3 gives me: t h equickbrown Any idea how to do this? I'm thinking maybe I can just split the whole st

Re: compact my wordlist generator

2009-10-25 Thread Michael Alipio
I was thinking about this recursive thing... thanks for the tip.. will try this out.. I hope I can accomplish it. --- On Sun, 10/25/09, Gabor Szabo wrote: > From: Gabor Szabo > Subject: Re: compact my wordlist generator > To: "Michael Alipio" > Cc: "begginer

compact my wordlist generator

2009-10-25 Thread Michael Alipio
Hi, I'm trying to write a word list generator which can generate all possible combinations of n characters, within n set of characters. So far, this is what I have come up. The only input is the lenght of the password the user wants. my @set = qw(a b c d e f g h i j k l m n o p q r s t

Re: Daemon::Easy and self-killing

2009-10-15 Thread Michael Pobega
On 0, Steve Bertrand wrote: > Michael Pobega wrote: > > I'm using the Daemon::Easy module to write a basic Perl daemon, but I'm > > wondering if there is a way to stop the daemon from within the script (as > > opposed to running "./script.pl stop")? Cur

Daemon::Easy and self-killing

2009-10-14 Thread Michael Pobega
I'm using the Daemon::Easy module to write a basic Perl daemon, but I'm wondering if there is a way to stop the daemon from within the script (as opposed to running "./script.pl stop")? Currently I have a subroutine to do this, but it doesn't seem to cleanly erase the pid file. > &killMe { >

complex split (when delimiter appears in one of the fields)

2009-06-11 Thread Michael Alipio
Hi, I have a string that looks like this: my $string = "1, 3, 0. 0. 0. 0, 22, Zak',adfk $&! mac., "; Basically, there are seven fields. after the bird, everything up to the last comma is the 5th field. 6th field is blank. Now my problem is splitting it and extracting the 5th field. If I wil

2 minutes and 8 second (how do i convert it to 02:08)??

2009-06-11 Thread Michael Alipio
Hi, I have a program that computes the number of elapsed minutes and seconds. if the outputs are: 2 minutes, and 8 seconds. How do I print those two values to look like "Elapsed time: 02:08" Thanks! -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands

Re: variables gets shared to child but resets back after exiting fork

2009-05-27 Thread Michael Alipio
s. Another problem solved!!! Till next time! --- On Wed, 5/27/09, Chas. Owens wrote: > From: Chas. Owens > Subject: Re: variables gets shared to child but resets back after exiting fork > To: "Michael Alipio" > Cc: "begginers perl.org" > Date: Wedn

Re: variables gets shared to child but resets back after exiting fork

2009-05-27 Thread Michael Alipio
;m reading the perlipc now.. nothing so far.. --- On Wed, 5/27/09, Chas. Owens wrote: > From: Chas. Owens > Subject: Re: variables gets shared to child but resets back after exiting fork > To: "Michael Alipio" > Cc: "begginers perl.org" > Date: Wednesday, May 2

variables gets shared to child but resets back after exiting fork

2009-05-27 Thread Michael Alipio
Hi, I have to run an external program but the program does not termination on some conditions, e.g, ping, will not exit unless you specify -c or some other circumstances. Now I what I want to do is: my @array; die "Cannot fork myprog" unless (defined my $pid = fork) if ($pid==0){ open MYPROG

script to control web browser (enter captcha text manually)

2009-05-23 Thread Michael Alipio
Hi, I need to register a few accounts on a website that uses captcha. It's just a few accounts but it's a very daunting task because there are so many fields to fill up. Is there a way I can do this in perl? What I want is that my script will fire up the browser, access that particular registr

Re: two nested hashes, one subroutine, after calling, my second hash disappears

2009-05-21 Thread Michael Alipio
Hi, > >      >    $$postdata{'login:command/username'} = > ($username eq '')?'':$username; > > $$postdata{'login:command/username'} is usually written as > $postdata->{'login:command/username'}.  You compare > $username to '' and if it is equal to '' then you return '' > and if it is not equal

two nested hashes, one subroutine, after calling, my second hash disappears

2009-05-21 Thread Michael Alipio
Hi, I thought I had it all figured out. Hash within hashes really made my code cleaner until I came up with this code: While looping, I was creating a key 'webloginpostdata' with value of anonymous hash as seen below; $all_ap{$_}->{'webloginpostdata'} = {

How does printf able to receive a pointer when passing it a string constant?

2009-05-13 Thread Michael Alipio
I have a c code that looks like this: #include main (){ char girl[] = "anna"; char boy[] = "jude"; stringcopy(boy, girl); /* copy boy to girl */ printf("%s", girl); } void stringcopy(char *b, char *g){ while ((*g++ = *b++) != '\0') ; } It prints fine... However if I replace the stringcopy

Cross compiling to mipsel

2009-05-12 Thread Michael Alipio
Hi, I've searched the web and didn't find anything useful. Is there anyway to cross compile my perl code to mipsel? or do i have to learn C?? -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

AW: Problem with threaded Math::GMP

2009-04-28 Thread SCHWARTZKOPFF, Michael, Dr. (Extern)
-Ursprüngliche Nachricht- Von: Brian J. Miller [mailto:wigg...@danconia.org] Gesendet: Dienstag, 28. April 2009 14:15 An: SCHWARTZKOPFF, Michael, Dr. (Extern) Cc: beginners@perl.org Betreff: Re: Problem with threaded Math::GMP SCHWARTZKOPFF, Michael, Dr. (Extern) wrote: > Hi, >

Problem with threaded Math::GMP

2009-04-28 Thread SCHWARTZKOPFF, Michael, Dr. (Extern)
not use threads? Howto make cpan install a "normal" verison, which my system can use? Thanks for any help. Mit freundlichen Gruessen / Best regards Michael Schwartzkopff MTU Aero Engines GmbH Abteilungsbezeichnung () Department () Dachauer Str. 665 80995 Muenchen Germany Tel +4

Controlling screen output. Print something then afterwards replace it

2009-04-22 Thread Michael Alipio
Hi, Is it possible to print something and then replace what you have printed with a different value? Say I have a program that watches a logfile and prints the current number of lines. after sleeping for n seconds, it will print the number of lines again. But i don't want to print it below t

sleep exactly after n seconds (sleep finishing longer than specified)

2009-04-22 Thread Michael Alipio
Hi, I have a script that forks a child. at the parent, i have a line that tells it to sleep for n seconds. Once the 3 seconds have passed, it will kill the child process. I noticed that most of the time, sleep doesn't count exact seconds.. most of the time it's longer. Is there any way to sle

trouble with nested forks() (keep spawning twin process)

2009-04-16 Thread Michael Alipio
Hi, I have this code: die "Could not fork command1!" unless defined (my $command1_pid = fork); if ($command1_pid == 0){ open EXTERNAL_PROG1, "external_prog1 |" or die "Can't run external_prog1"; while (){ if (/pattern/){ die "Could not fork command2" unless defined (my $command2_p

Re: Turn off $ anchor greedy behavior

2009-04-14 Thread Michael Alipio
Aha, found it.. The split returned a list and you've just sliced it. giving [-1] means the list will start running through the elements backwards. --- On Tue, 4/14/09, Michael Alipio wrote: > From: Michael Alipio > Subject: Re: Turn off $ anchor greedy behavior > To: &

Re: Turn off $ anchor greedy behavior

2009-04-14 Thread Michael Alipio
> > Or use split and return the last field: > > $ perl -le' > my $string = "boy, pig, 123, 123:412adbd, d0g, > lajdlf134><<_ lkadsf !234,\n"; > my $value = ( split /,\s+/, $string )[ -1 ]; Another mind bogling example... :-) I thought I would do: my @value = ( split /,\s+/, $string ); print $

Re: AW: Turn off $ anchor greedy behavior

2009-04-14 Thread Michael Alipio
> my $string = 'boy, pig, 123, 123:412adbd, d0g, > lajdlf134><<_ lkadsf !234,'; > > if( $string =~ m/,\s*([^,]*),[^,]*$/ ){ > print "$1\n"; > } How could you guys write this so simple? My regexp was twice this long. the regexp after \s* tells perl to match anything (0 or more) that is not a

Turn off $ anchor greedy behavior

2009-04-14 Thread Michael Alipio
Hi, I have a $string that is separated by , and space; boy, pig, 123, 123:412adbd, d0g, lajdlf134><<_ lkadsf !234, Now I want to capture the string(s) between last two commas. It consists of anything upto 32 characters. that is, right after d0g,\s+ up to the last character before the last c

  1   2   3   4   5   6   7   8   9   10   >