Re: Trying to set the iCloud directory in Perl, but failing

2021-08-13 Thread Robert Wohlfarth
ks for any info… ;) > > Wags ;) > WagsWorld > Hebrews 4:15 > Ph(primary) : 408-914-1341 > Ph(secondary): 408-761-7391 > -- Robert Wohlfarth

Re: Debug when script WILL NOT RUN

2015-01-31 Thread Robert Wohlfarth
tdir is a parameter to a function call. It should not have a semi-colon after it. -- Robert Wohlfarth

Re: async, non blocking tcp server

2014-08-29 Thread Robert Wohlfarth
mer's point of view). > It sounds like you want an event loop that triggers on socket activity. Would something like AnyEvent::Socket <http://search.cpan.org/~mlehmann/AnyEvent-7.07/lib/AnyEvent/Socket.pm> work for you? I came across it by googling "perl socket event handler". -- Robert Wohlfarth

Re: Suddenly this script is not working!

2014-07-30 Thread Robert Wohlfarth
09. No other line is simply How about the 0D 0A at the end of the line? Unless the script used "chomp", the exact line is "\r\n". -- Robert Wohlfarth

Re: Wanted: Help with DBI/CGI in Windows 8.1/IIS

2014-06-26 Thread Robert Wohlfarth
t;h1("hello world $ct"); # level 1 header >>> >>> print $q->end_html; # end the HTML >>> >> > One more thing that came up while testing your code... Did you configure > the ODBC datasource? Is Microsoft Access installed on the server? DBI will need it to read the file. -- Robert Wohlfarth

Re: question on escaping shell command

2014-05-15 Thread Robert Wohlfarth
ot; and treats the rest of the line like a comment. When passing "!@\#bsay0nd" to the shell, it interprets "#" as a literal character instead. -- Robert Wohlfarth

Re: Match Variables Not Working in m//

2014-03-19 Thread Robert Wohlfarth
\w+). The "\*" matches a literal asterisk - which isn't in the string. So the match fails. Add the "s" and it does what you expect. -- Robert Wohlfarth

Re: Search one character against one string

2014-03-12 Thread Robert Wohlfarth
); This is a good example of how Perl flattens a parameter list. The "&is_in_string(@ar, $c)" turns into "&is_in_string('t', 'd', 's', 'd');". @_[0] only grabs the first parameter 't'. $_[1] grabs the second parameter - the 'd' from @ar. -- Robert Wohlfarth

Re: OO perl programming

2014-02-13 Thread Robert Wohlfarth
b is that objects represent "things". I think of objects as managing state - the state of an individual "thing". Modules with all class methods do not represent "things". They're just functions. -- Robert Wohlfarth

Re: Newbie creating Perl web report

2014-02-07 Thread Robert Freiberger
; Catalyst is better. >> >> Also, if you know to use some Perl modules like an ORM like DBIx::Class, >> a templating system like Template-Toolkit or others, Catalyst is better >> because it is very flexible and lets you use what you want. >> But if you don't know

Newbie creating Perl web report

2014-02-06 Thread Robert Freiberger
r Flask the new recommended method for creating web based tools or scripts? My goal is making some reports for work that would stay internally but also apply what I learn to other external side projects. Thanks, Robert -- Robert Freiberger

Re: Regex not working correctly

2013-12-11 Thread Robert Wohlfarth
the number part ? > There are two sets of capturing parenthesis: * (91\d{10}|0\d{10}|[7-9]\d{9}|0\d{11}) = $1 * (\d+) = $2 The first set stores its match in $1 and the second set in $2. The pipe (or) does not reset the capture counter back to 1. The counter strictly goes from left to right. -- Robert Wohlfarth

Re: hello from a newbie

2013-10-26 Thread Robert Freiberger
inners-unsubscr...@perl.org > For additional commands, e-mail: beginners-h...@perl.org > http://learn.perl.org/ > > > -- Robert Freiberger 510-936-1210

Re: Puzzled by ouput from this script

2013-09-11 Thread Robert Wohlfarth
On Wed, Sep 11, 2013 at 5:04 PM, Harry Putnam wrote: > while(<$cmdh>) { > print $fh; > print; > I believe this code prints the file handle. Try this: while(<$cmdh>){ print $fh $_; print; -- Robert Wohlfarth

Re: cpan App::cpanminus

2013-07-22 Thread Robert Freiberger
some tips about installing cpanm. http://perltraining.com.au/tips/2012-03-27.html Thanks, Robert On Mon, Jul 22, 2013 at 10:53 PM, wrote: > Yes, I am able to connect http://strawberryperl.com from chrome browser. > Even I have downloaded 01mailrc.txt.gz using > http://cpan.strawbe

Creating a Perl web site, how should I build this

2013-07-03 Thread Robert Freiberger
t it looks like (I could be wrong) that this is no longer the standard, and more people recommend going with Dancer, Mojolicious or Catalyst. If anyone could provide suggestions to get started that would be great. Thanks, Robert -- Robert Freiberger 510-936-1210

Re: how to make perl program run continue when i press control+s to pause screen output

2013-06-06 Thread Robert Wohlfarth
If you want to pause the actual program, then try Ctrl+Z. On a unix/linux box that will work. See http://www.gnu.org/software/bash/manual/bashref.html#Job-Control for more information. -- Robert Wohlfarth

Re: Perl and Web Development

2013-06-03 Thread Robert Wohlfarth
ple, and it's pretty easy to learn. http://www.catalystframework.org/ -- Robert Wohlfarth

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 Robert Wohlfarth
It's been a while since I've used it. I seem to recall that standard output gets sent there. -- Robert Wohlfarth

Re: variable definition error not caught when using strict and warnings

2012-11-09 Thread Robert Wohlfarth
value, which is what the warning tells you. Perl expects program variables to start with a letter or underscore. So "$a999" or "$num" work like you expected. You can find more about variable names here: http://perldoc.perl.org/perldata.html. -- Robert Wohlfarth

Re: My long script

2012-09-15 Thread Robert Wohlfarth
and" keeps returning decimal numbers between 3 and 4, like 3.4526180 and 3.9876261 and 3.1182304. Instead of picking answers at random, what about shuffling the answers and take the top 5? They're still in a random order. And you eliminate even the possibility of an infinite loop. A modu

RE: DBD::ODBC SQL Server Stored Procedure

2012-08-29 Thread Gorrebeeck, Robert
s that we got a valid referral id back --Convert so we can return the value to our script SELECT @RefID = RTRIM(CONVERT(CHAR(36), @ReferralID)) END END RETURN SET NOCOUNT OFF Robert Gorrebeeck Sr. Apps Dev Analyst Coventry Workers Comp Services Solutions to Restore Heal

DBD::ODBC SQL Server Stored Procedure

2012-08-29 Thread Gorrebeeck, Robert
edure by itself , I get values back, but when I run it from my perl script, the values are empty. Not sure what is going on - any advice would be greatly appreciated Thanks Robert Gorrebeeck Email Confidentiality Notice: The information contained in this transmission is confidential, proprieta

Re: DBIx schema loader (dump schema using make_schema_at) wierd behaviour

2012-08-08 Thread Robert Wohlfarth
s-unsubscr...@perl.org > For additional commands, e-mail: beginners-h...@perl.org > http://learn.perl.org/ > > > Take a look at the documentation for DBIx::Class::Schema::Loader::Base. It explains how *make_schema_at* renames tables into classes. http://search.cpan.org/~rkitover/DBIx-Class-Schema-Loader-0.07025/lib/DBIx/Class/Schema/Loader/Base.pm#naming -- Robert Wohlfarth

Re: Unexpected token error when providing a regular expression as input

2012-08-01 Thread Robert Wohlfarth
quot;(.es.){3}" before running Perl. Those extra slashes you added tell "bash" to not interpret the parenthesis. You could also get around the problem by quoting the regular expression on the command line, like this: # ./grep.pl '(.es.){3}' /usr/share/dict/words Hope that helps. -- Robert Wohlfarth

Re: return two varibles

2012-06-07 Thread Robert Wohlfarth
$val}) { return @{$apcHash{$val}}{qw/start end/}; } else { return (); } } -- Robert Wohlfarth

Re: lexical scope

2012-06-05 Thread Robert Wohlfarth
p $line; > @array = split(/\s+/, $line,-1); > } > The "while" loop overwrites the contents of "@array". Every line overwrites the previous one. I believe that you want a two dimensional array here. -- Robert Wohlfarth

Re: someone anyone Spreadsheet::xlsx help!

2012-05-25 Thread Robert Wohlfarth
cell: my $cell = $worksheet->{Cells}[$row][$column]; print $cell->value; -- Robert Wohlfarth

Re: Template toolkit issue

2012-05-02 Thread Robert Wohlfarth
HTTP headers. I would expect the script to run Template Toolkit, capture the results, and include those results in an HTTP response. -- Robert Wohlfarth

Re: Foreach loop and hash of arrays

2012-02-06 Thread Robert Wohlfarth
350 => 'AL', 351 => 'AL', 995 => 'AK', 996 => 'AK', 850 => 'AZ', 851 => 'AZ', 716 => 'AR', 717 => 'AR', ); > my $customers_state = 'AZ'; my $customers_zip = '850'; if ( exists( $zips{$customers_zip} ) and $zips{$customers_zip} eq $customers_state ) { print 'yes'; } else { print 'no'; } -- Robert Wohlfarth

Re: array uniq elements

2012-01-08 Thread Robert Wohlfarth
On Sun, Jan 8, 2012 at 11:15 PM, Chris Stinemetz wrote: > How do I extract uniq elements from an array? Basically I want to > preserve the order of the elements as they are first seen, but I would > like to remove any duplicates. > You may want to check out List::MoreUtils on CPAN.

Re: perl equivelent of which in bash

2012-01-04 Thread Robert Wohlfarth
uot;which" turned up File::Which<http://search.cpan.org/~adamk/File-Which-1.09/lib/File/Which.pm>. It may meet your needs. -- Robert Wohlfarth

Re: segmentation fault

2011-12-21 Thread Robert Wohlfarth
On Wed, Dec 21, 2011 at 10:37 AM, Shlomi Fish wrote: > On Wed, 21 Dec 2011 09:48:19 -0600 > Robert Wohlfarth wrote: > > > On Tue, Dec 20, 2011 at 11:25 AM, Motaz SAAD > wrote: > > > > > I am a beginner in perl and I have segmentation fault in my code. the >

Re: segmentation fault

2011-12-21 Thread Robert Wohlfarth
text > to xml file > \n"; > #### > > >$writer->endTag(); >print "closing page tag for the article num: ", $testCount, > " \n"; >$testCount++; > > # print $testCount; print "\t"; > # if ($testCount == 10){ > # print "\n"; > # last; > # } > > >}#end if for en ar fr > >if (($$enText =~ /\[\[fr:/i)){ > >#print $page->title, "\n"; >$EnFrCount ++; >} > >if (($$enText =~ /\[\[ar:/i)){ >#print $page->title, "\n"; >$EnArCount ++; >} >#print "working \n"; > > }# end for while loop (for each english article) > > > $writer->endTag(); > $writer->end(); > $output->close(); > > > print "\n\n"; > print "English : "; > print $EnCount; > > print "\n\n"; > print "English/Arabic/French : "; > print $EnArFrCount; > > print "\n\n"; > print "English/Arabic : "; > print $EnArCount; > > print "\n\n"; > print "English/French : "; > print $EnFrCount; > > > > #removes any case sensativity from the very first letter of the title > #but not from the optional namespace name > sub case_fixer { > my $title = shift; > > #check for namespace > if ($title =~ /^(.+?):(.+)/) { >$title = $1 . ':' . ucfirst($2); > } else { >$title = ucfirst($title); > } > > return $title; > } > -- Robert Wohlfarth

Re: How to create randomly generated emails

2011-10-14 Thread Robert Wohlfarth
n vary the size (number of words) in each record. -- Robert Wohlfarth

Re: /usr/lib/perl5/auto/Cwd/Cwd.so: undefined symbol: Perl_Gthr_key_ptr [SOLVED?]

2011-09-21 Thread Robert P. J. Day
On Wed, 21 Sep 2011, Paul Johnson wrote: > On Wed, Sep 21, 2011 at 08:31:10AM -0400, Robert P. J. Day wrote: ... snip ... > > p.s. is there a way to identify which perl module supplies the > > Perl_Gthr_key_ptr symbol? perhaps it's just a dependency issue > > that di

Re: /usr/lib/perl5/auto/Cwd/Cwd.so: undefined symbol: Perl_Gthr_key_ptr

2011-09-21 Thread Robert P. J. Day
On Wed, 21 Sep 2011, Paul Johnson wrote: > On Wed, Sep 21, 2011 at 09:17:40AM -0400, Robert P. J. Day wrote: ... snip ... > > but there's a possible solution. when one initially configures > > the project, one can select that *all* of those host tools will be > > r

Re: /usr/lib/perl5/auto/Cwd/Cwd.so: undefined symbol: Perl_Gthr_key_ptr

2011-09-21 Thread Robert P. J. Day
esigned. rday -- ======== Robert P. J. Day Ottawa, Ontario, CANADA http://crashcourse.ca Twitter: http://twitter.com/rpjday LinkedIn: http://ca.linkedin

Re: /usr/lib/perl5/auto/Cwd/Cwd.so: undefined symbol: Perl_Gthr_key_ptr

2011-09-21 Thread Robert P. J. Day
On Wed, 21 Sep 2011, 'lesleyb' wrote: > On Wed, Sep 21, 2011 at 07:24:51AM -0400, Robert P. J. Day wrote: > > > > argh ... after just skipping the component that was causing the > > earlier error, i got further and then this: > > > Probably a good ide

Re: /usr/lib/perl5/auto/Cwd/Cwd.so: undefined symbol: Perl_Gthr_key_ptr

2011-09-21 Thread Robert P. J. Day
On Wed, 21 Sep 2011, 'lesleyb' wrote: > On Wed, Sep 21, 2011 at 07:24:51AM -0400, Robert P. J. Day wrote: > > > > argh ... after just skipping the component that was causing the > > earlier error, i got further and then this: > > > Probably a good ide

/usr/lib/perl5/auto/Cwd/Cwd.so: undefined symbol: Perl_Gthr_key_ptr

2011-09-21 Thread Robert P. J. Day
to know what's behind these things. thanks. rday -- ==== Robert P. J. Day Ottawa, Ontario, CANADA http://crashcourse.ca Twitter:

Re: symbol lookup error: .../Parser.so: undefined symbol: Perl_Istack_sp_ptr

2011-09-21 Thread Robert P. J. Day
On Wed, 21 Sep 2011, Robert P. J. Day wrote: > On Wed, 21 Sep 2011, Francisco Rivas wrote: > > > Hello, > > > > I went through the same issue and what I found was just recompile > > the module in your case it would be HTML::Parser, what i did is CPAN > > - in

Re: symbol lookup error: .../Parser.so: undefined symbol: Perl_Istack_sp_ptr

2011-09-21 Thread Robert P. J. Day
t a shot if that's what you're suggesting. rday -- ==== Robert P. J. Day Ottawa, Ontario, CANADA http://crashcourse.ca Twitter:

symbol lookup error: .../Parser.so: undefined symbol: Perl_Istack_sp_ptr

2011-09-21 Thread Robert P. J. Day
efile:617: *** [Pacemaker_Explained.txt] Error 127 obviously, publican is using perl parsing to generate the docs and i have no idea where it's supposed to find that symbol. anyone want to suggest how, on an ubuntu system, i can resolve that missing symbol? thanks. rday -- =====

Re: Just why?

2011-08-12 Thread Robert Wohlfarth
ers to func. Change the code like this: print func() * 5, "\n"; -- Robert Wohlfarth

Wind32::ODBC question

2011-08-09 Thread Gorrebeeck, Robert
'SQL_ATTR_CONNECTION_TIMEOUT' Attribute, but with no success Has anyone run into this issue before? Is there another setting that I can try to set to let my query complete? Any help would be appreciated Thanks in advancer Robert Gorrebeeck Sr. EDI Apps Dev Analyst Coventry Workers'

Creating letter combination generator

2011-07-08 Thread Robert
I have currently wrote a simple script to attempt to create a list of every letter combination this is a rough outline of what I want my program to do . . . A B C ... AA AB AC I used perl a bit for a high school project several years ago so I'm not that good at it =( Never the less I have extens

Re: Getting script to run w/o optional module

2011-06-09 Thread Robert Wohlfarth
t. Is > that possible? > Would something like this meet your need? I found it on CPAN by searching<http://search.cpan.org>for "Module". http://search.cpan.org/~ivorw/Module-Optional-0.03/lib/Module/Optional.pm -- Robert Wohlfarth

Re: Nature of this list

2011-04-19 Thread Robert
elettes is going too far!!! Dem's fighting words! :) -- Robert -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: Order in which keys are stored in a hash

2011-04-06 Thread Robert Wohlfarth
doc.perl.org/functions/sort.html> for examples of how to arrange for an output ordering.* It's easy to miss if you didn't know to look for it. My limited understanding is that Perl handles the order internally. Code should never rely on a specific order. -- Robert Wohlfarth

Re: problem with naming of variables

2011-03-28 Thread Robert Wohlfarth
do this? Thanks > > @bet1 = (0,0,0,0); > @bet2 = (0,0,0,1); > @bet3 = (0,0,1,0); > > $random_bet_position = int(rand(3) + 1); > > @selected_bet = @{bet$random_bet_position); > @bets = ( [0,0,0,0], [0,0,0,1], [0,0,1,0] ); @selected_bet = @{$bets[$random_bet_position]}; -- Robert Wohlfarth

Re: Randomizing a 24hr time period

2011-02-09 Thread Robert Wohlfarth
7;, $h, $m; > ++$h, $m = 0 if ++$m >= 60; > } > I assume that Mike (the original poster) would get 50 times by substituting "[0..50]" in place of "[0..24]". my @sample = (shuffle @times)[0..24]; > And this last piece then sorts the 50 random times into chronological order for the cron job. It's very clever. print "$_\n" foreach sort @sample; -- Robert Wohlfarth

Re: Perl... Logging to console and Log file

2011-01-13 Thread Robert Wohlfarth
the below steps which i performed to send a message to > log. > Take a look at Log::Log4perl<http://search.cpan.org/%7Emschilli/Log-Log4perl-1.31/lib/Log/Log4perl.pm>( http://search.cpan.org/~mschilli/Log-Log4perl-1.31/lib/Log/Log4perl.pm). It handles multiple outputs seamlessly. -- Robert Wohlfarth

Re: Out of memory, HTML::TableExtract

2011-01-06 Thread Robert
{ foreach my $lrow ( $lTableExtract->rows ) { chomp( @$lrow[$#$lrow] ); push( @ldata, $lrow ); } } } return \...@ldata; } Thanks Jins Thomas --0016364270585953cf049927ffd4-- -- Robert -- To unsubscribe, e-mail:

Re: problems hashing

2011-01-06 Thread Robert Wohlfarth
d up with something like this... $fieldMap{8} = 1023240136 $fieldMap{1218} = 0 $fieldMap{1} ="00a01a2bcdc7" Perl expects the data to have a value for every key. The first error - odd number of elements - means that Perl saw a key without a corresponding value. The data has an odd number of elements. To save into a hash, it should have an even number of elements. -- Robert Wohlfarth

Re: glob files and subdirectories

2010-12-08 Thread Robert Wohlfarth
pan.org/%7Epetdance/File-Next-1.06/Next.pm>module. -- Robert Wohlfarth

Re: Redirecting the output

2010-12-01 Thread Robert Wohlfarth
elf... > > Jim Gibson wrote: > >> Install and use the File::Tee module from CPAN: >> > > I researched the various options a while back and settled on Capture::Tiny. > Since this looks like a log file, you might also consider Log::Log4perl. -- Robert Wohlfarth

Re: Simple Script That Runs Under Perl 5.8 but not under Perl 5.10

2010-11-24 Thread Robert Wohlfarth
-- > Declare the subroutine before calling sort. Something like this... sub cmpChrs(); foreach my $chr (sort cmpChrs keys %SAM) { print "CHR=$chr\n"; } The *sort* documentation for 5.12 shows three forms: - sort SUBNAME LIST - sort BLOCK LIST - sort LIST I&

Re: perl web apps

2010-11-22 Thread Robert Wohlfarth
miliar > with js). thoughts? > Check out Catalyst (http://www.catalystframework.org/). It handles the drudgery without forcing you into one way of doing things. -- Robert Wohlfarth

Re: regex problem

2010-11-05 Thread Robert Wohlfarth
.pm>. It handles all of these details for you. -- Robert Wohlfarth

Re: reference of an array into an array

2010-11-04 Thread Robert Wohlfarth
} The first time through, @mytemp uses memory location 12345. The second time through, @mytemp uses memory 12399. Third time, it's 12563. And so on... Now you have a series of different memory locations, with different values for $a, $b, and $c. Does that make sense? -- Robert Wohlfarth

Re: Regular expression: Search a pattern but starting from the end of a string?

2010-11-02 Thread Robert Wohlfarth
.looong string possibly with many E's...E.no capital e' here...3456" $string =~ m/E[^E]*$/; The expression matches a capital E, followed by zero or more non-E characters, and the end of the line. -- Robert Wohlfarth

Re: Auto completing STDIN from a script

2010-10-07 Thread Robert Wohlfarth
c.perl.org/perlopentut.html#Pipe-Opens. -- Robert Wohlfarth

Re: dereferencing hash arrays

2010-08-19 Thread Robert Wohlfarth
rHash}) while (my ($key, $value) = each %{$rHash}) To access a single entry, you can do something like this: $value = $rHash->{'field'}; -- Robert Wohlfarth

Re: Strange behaviour while using DBI with binding

2010-08-19 Thread Robert Wohlfarth
oin personal_data on user.id = personal_data.id where gender = ? and position = ? order by lname limit ?,? }); $sth->execute($gender, $role, $offset, $number_rows); -- Robert Wohlfarth

Re: Calling Exit from within a subroutine

2010-07-21 Thread Robert Wohlfarth
ng to continue from here once sub foo has ended and I have not called exit here or in the sub? } elsif ($bar){ my_sub_bar(); } else { my_other_sub(); } exit 0; -- Robert Wohlfarth

Re: I don't wont to create more lines of code then the necessary

2010-07-09 Thread Robert Wohlfarth
message, "split" should not be called in a scalar context. use strict; use warnings; sub xpto(@) {}; xpto( split(/\n/, "fv\nfg" ) ); -- Robert Wohlfarth

Re: Edit large data file

2010-06-28 Thread Robert Citek
is might work: $ cat foo A:BC:D $ perl -F: -i.bak -lane ' if ($#F == 2) { @foo=split(//,$F[1]) ; @F=($F[0], @foo, $F[2]) } ; print join(":", @F) ; ' foo $ tail -v -n +1 foo* ==> foo <== A:B:C:D ==> foo.bak <== A:BC:D Haven't tried it on a large file, s

Re: Getopt::Long

2010-06-17 Thread Robert Wohlfarth
treating "-a" as the value for "-s" because the string "-a" immediately follows the option -s. You could add validation on the value of "-s". For example... GetOptions( "n|name=s" => \$name, "a|age=i" => \$age, "s|sex=s" => \$sex, ) || die "Bad options\n";; if ($sex !~ m/m(ale)?|f(emale)?/i) { die "Invalid gender $sex\n"; } -- Robert Wohlfarth

Re: Edit large data file

2010-06-16 Thread Robert Citek
On Tue, Jun 15, 2010 at 1:50 PM, mrwawa wrote: > Is this possible, and if so how can I do it? Can you give an example? For example, using colons instead of tabs, if the input looks like this: A:BC:D then you want it to look like this: A:B:C:D Is that right? Regards, - Robert --

Re: What is the best way to parse a GPX (XML) file

2010-06-16 Thread robert Key
the key? I don't mind writing my own parser although this seems to be reinventing the wheel but some like XML::Parser are very general purpose and require a huge learning curve. Any ideas or suggestions would be helpful. Thanks, Robert Key Have a look at http://search.cpan.org/~andy

What is the best way to parse a GPX (XML) file

2010-06-16 Thread robert Key
ng my own parser although this seems to be reinventing the wheel but some like XML::Parser are very general purpose and require a huge learning curve. Any ideas or suggestions would be helpful. Thanks, Robert Key -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional comman

Re: Edit large data file

2010-06-16 Thread Robert Wohlfarth
th the new parsed row. >> >> Is this possible, and if so how can I do it? >> > > It is possible, you just have to write the new data to a new file. You might also want to look at the "-n", "-p", and "-i" command line options for Perl (http://perldoc.perl.org/perlrun.html). -- Robert Wohlfarth

Re: Just asking - Tips on how to maintain your scripts ..

2010-06-05 Thread Robert Wohlfarth
se Bazaar at work (Windows). I create a branch on a USB stick to work from home (Linux). On Monday, it's a matter of merging the USB branch back into the original. -- Robert Wohlfarth

Re: Developer docs

2010-05-28 Thread Robert Wohlfarth
into my > current documentation methodology so that people can still enjoy my user > docs, while I can review my devel docs within a separate `perldoc' page? > I've seen large projects like Moose put user documentation under Moose::Manual::... The developer documentation is named after the actual code module. -- Robert Wohlfarth

Re: execute and analyze unix command with perl

2010-05-27 Thread Robert Morales
Ok, now I added the: my $regex = "^((?!total).)*\$"; I also removed the " " from the numbers in the if test: if ($array[6] >= 867580){ The error msg I get this time, is like this: r...@user# ./script.pl 0 Use of uninitialized value $array[6] in numeric ge (>=) at ./script.pl lin

Re: execute and analyze unix command with perl

2010-05-27 Thread Robert Morales
Tnx Guys! the $vgs variable is of course and error and should be $memory. After adding your suggestions, I ran the script over again and got this error: r...@user# ./script.pl Final $ should be \$ or $name at ./script.pl line 11, within string syntax error at ./script.pl line 11, near "= "^((?!to

execute and analyze unix command with perl

2010-05-27 Thread Robert Morales
Hi, I want my code to execute the unix free command in order to analyze the memory state, and issue a warning if the cached memory increases. I don`t know what I did wrong, but this is what I got for now: #! /usr/bin/perl use warnings; use strict; # return codes $ok = 0; $warning = 1; $critical

DBD Oracle Assistance

2010-05-24 Thread Gorrebeeck, Robert
: Error while trying to retrieve text for error ORA-03113 (DBD ERROR: OCIStmtExecute) Does anyone have any clues as to why this could be happening? Thanks in advancer Robert Gorrebeeck Sr. EDI Apps Dev Analyst Coventry Workers' Comp Services Solutions to Restore Health and Product

Re: How do I control a C programme from perl?

2010-05-15 Thread robert Key
On 14/05/2010 22:26, C.DeRykus wrote: On May 14, 8:15 am, robert...@telkomsa.net (robert Key) wrote: Hi Eitan, I have just used fflush and it works. The real problem is that C programme was just a test programme. I am using someone else's programme and I only have the binary! This makes

Re: How do I control a C programme from perl?

2010-05-14 Thread robert Key
Hi Eitan, I have just used fflush and it works. The real problem is that C programme was just a test programme. I am using someone else's programme and I only have the binary! This makes life complicated. The only way will be to try and unbuffer output and then launch the c binary so that it in

Re: How do I control a C programme from perl?

2010-05-14 Thread robert Key
Hi I have downloaded the modules and will give use them. Thanks for your help, Rob Key On 13/05/2010 14:13, Robert Wohlfarth wrote: On Thu, May 13, 2010 at 1:21 AM, robert Keywrote: Hi, I want to capture UNBUFFERED output from a C programme and then control it depending on its output

Re: How do I control a C programme from perl?

2010-05-14 Thread robert Key
thanks so much for your help. I will check it out. I have been progaming for a long time in fortran, PL/M, c, c++,perl but there is always more to learn, great! I should try this under windows instead of linux and see what happens. Thanks Eitan. I have also downloaded the Expect modules and ch

Re: How do I control a C programme from perl?

2010-05-13 Thread robert Key
On 13/05/2010 14:16, Bob McConnell wrote: From: robert Key I want to capture UNBUFFERED output from a C programme and then control it depending on its output. Problem is nothing seems to unbufferd the output from the C programme. Only when the child has finished executing do I get all the

Re: How do I control a C programme from perl?

2010-05-13 Thread Robert Wohlfarth
On Thu, May 13, 2010 at 1:21 AM, robert Key wrote: > Hi, > I want to capture UNBUFFERED output from a C programme and then control it > depending on its output. Problem is nothing seems to unbufferd the output > from the C programme. Only when the child has finished executing do I g

How do I control a C programme from perl?

2010-05-12 Thread robert Key
defined $pid; $SIG{HUP} = sub {die "child: killed by parent\n"}; # try and un buffer output STDOUT->autoflush(1); print STDOUT "child: starting\n"; # start the C programme which has printf in a loop exec("/home/rober

Re: Teaching Perl

2010-05-05 Thread Robert H
On 5/5/10 6:12 PM, in article 861vdqhuat@red.stonehenge.com, "Randal L. Schwartz" wrote: >> "Shlomi" == Shlomi Fish writes: > > Shlomi> Why do you need a version with a function that is specifically > Shlomi> called "doors"? What will this "doors" function do? Generally > Shlomi> funct

Re: logic not being able to score last element in the array

2010-05-05 Thread Robert Wohlfarth
',',$line); @score_key=shift(@key); return @key; } See http://perldoc.perl.org/functions/chomp.html for more information about "chomp". -- Robert Wohlfarth

Re: about split and \d or . (.)

2010-04-11 Thread Robert Wohlfarth
; > my @elems3 = split(//,$var); > The first two patterns match every character. When everything is a separator, there's nothing left as data. -- Robert Wohlfarth

Re: XML Parsing/Modules

2010-04-07 Thread Robert Wohlfarth
m not > sure how to proceed like which module I've have to use etc. any pointers > would be much appreciated. > I've used XML::Parser <http://search.cpan.org/dist/XML-Parser/Parser.pm> to do simple things. The documentation is here: http://search.cpan.org/dist/XML-Parser/Parser.pm. -- Robert Wohlfarth

Re: Any Good SCM tool to manage Perl Code locally

2010-03-16 Thread Robert Citek
wikipedia.org/wiki/Bazaar_(software) [5] http://en.wikipedia.org/wiki/GitHub Regards, - Robert -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: use with variable

2010-03-10 Thread Robert Wohlfarth
executes at compile time - before "$oraenv" is set. Try the "require" command: require Env::Sourced; Env::Sourced->import( $oraenv ); The perlfunc man page has more information about "use" and "require". -- Robert Wohlfarth

Re: Test if directory is not empty

2010-03-07 Thread Robert Wohlfarth
ady have extensions > The "-e" test will tell you if the target file already exists. For example: if (-e $copyToFile) { # Add extension here... } -- Robert Wohlfarth

Re: how do I replace all the spaces in a string with +

2010-02-20 Thread Robert Citek
g =~ s/ /+/g; > > Or for a more efficient way: > > $string =~ tr/ /+/; For example: $ echo "foo bar zoo" | perl -pne '$_ =~ s/ /+/g' foo+bar++zoo $ echo "foo bar zoo" | perl -pne '$_ =~ y/ /+/' foo+bar++zoo Regards, - Robert -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: file handling

2010-02-12 Thread Robert Wohlfarth
;. 3. Loop from 2 to 1000... 1. Increment "Field ID" by 20. 2. Substitute the new "Field ID" for the old one, using regular expressions. 3. Substitute the counter (L) in the field. 4. Write the entire block out to a new file. Is that accurate? -- Robert Wohlfarth

Re: Simple cgi email

2010-02-05 Thread Robert H
On Fri, 05 Feb 2010 11:36:14 +0200, Shlomi Fish wrote: > Hi Bob! > >> > Yes, every user will get them. > > Regards, > > Shlomi Fish Hey Shlomi! :-) -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org

Re: Simple cgi email

2010-02-04 Thread Robert H
On 2/2/10 1:46 PM, Uri Guttman wrote: "RH" == Robert H writes: RH> I am just trying to do a simple emailer for a site. I came up with the RH> following and was wondering if there are any security issues that jump RH> out. check out NMS versions of the classic

Simple cgi email

2010-02-02 Thread Robert H
I am just trying to do a simple emailer for a site. I came up with the following and was wondering if there are any security issues that jump out. I don't have the option of using anything from cpan for the most part. Bob = #!/usr/bin/perl -T use strict; use warnings; use

Re: double quotes are needed

2010-01-06 Thread Robert Wohlfarth
tes "print $first, > $second, $third\n"; > > 255, 255, 255 > 765 > print "$first, $second, $third\n" prints a single, scalar value. -- Robert Wohlfarth

Re: Understanding the definition of 'short-circuiting'

2009-12-29 Thread Robert Wohlfarth
_first returns true and the line prints. What about $result? Perl never called into the code for do_second, and $result never changed. We say that Perl short circuited the evaluation. It stopped executing code as soon as it knew the outcome of the logic statement. -- Robert Wohlfarth

  1   2   3   4   5   6   7   8   >