On Dec 1, 6:43 am, whereismel...@gmail.com (Melvin) wrote:
> Hi I have a file in the following format
>
> 111
> 222
> 333
>
> Now I need to print the following output from the given input file as
> 111 222 333
>
The versatile File::Slurp can be a handy shortcut:
# File::Slurp will croak if there'
On Nov 22, 1:39 pm, shawnhco...@gmail.com (Shawn H Corey) wrote:
> On 11-11-22 04:27 PM, Mark Wagner wrote:
>
> > I want to update a status file, similar to this:
>
> > open OUTFILE, ">", "status.txt";
> > print OUTFILE "$last_date\n";
> > close OUTFILE;
>
> > However, if something goes wrong (e.g.
On Oct 13, 3:33 am, ham...@nhn.leidenuniv.nl ("Hamann, T.D. (Thomas)")
wrote:
>
> I am trying to write a regex that should only match when certain patterns are
> not present, e.g. when a line does not start with either a digit or ALL-CAPS
> text. I figured I could use negative look-aheads for th
On Aug 26, 12:25 pm, shlo...@shlomifish.org (Shlomi Fish) wrote:
> ...
> The problem starts to happen when you try to declare $a and $b using my. This
> program:
>
> [CODE]
> #!/usr/bin/perl
>
> use strict;
> use warnings;
>
> my $a = 5;
> my $b = 6;
>
> print map { "$_\n" } sort { $a <=> $b } (9,1
On Aug 26, 12:25 pm, shlo...@shlomifish.org (Shlomi Fish) wrote:
> On Fri, 26 Aug 2011 20:08:31 +0100
>
> ...
>
> The problem starts to happen when you try to declare $a and $b using my. This
> program:
>
> [CODE]
> #!/usr/bin/perl
>
> use strict;
> use warnings;
>
> my $a = 5;
> my $b = 6;
>
> pri
On Aug 25, 7:01 am, jwkr...@shaw.ca ("John W. Krahn") wrote:
> Honza Mach wrote:
> > Hi everybody,
>
> Hello,
>
>
>
>
>
>
>
>
>
> > I was wondering, if it is possible to use backreferences in the pattern
> > repetition bracket operator.
>
> > Consider the following string:
>
> > my $string = "5 abc
On Aug 21, 4:33 am, xecro...@yahoo.com (Ron Weidner) wrote:
> Recently, I was asked to find the first occurrence of a word in a text file
> and replace it with an alternate word. This was my solution. As a new Perl
> programmer, I feel like this solution was too C like and not enough Perl
> li
On Aug 1, 10:51 am, rob.di...@gmx.com (Rob Dixon) wrote:
> On 01/08/2011 11:03, VinoRex.E wrote:
>
>
>
> > Hi everyone i am a beginer for Perl can you give me a psedocode and a
> > sample code for a spider program.It will be helpful in understanding web
> > interfaces.Thank you
>
> If you can't wr
On Jul 27, 10:07 am, siegfr...@heintze.com wrote:
> Sorry if this appears twice. Since it bounced back to me -- probably
> because of the HTML format -- I'm sending it again.
>
> I did some google searching and I could not find an example of a
> bidirectional asynchronous socket client. A telnet cl
On Jul 27, 9:30 am, rob.di...@gmx.com (Rob Dixon) wrote:
> ...
> > Well, one thing I dislike about it is that it is using "or do {...}"
> > instead of
> > an "if ( ) { ... }". And I did mention something similar.
>
> What exactly is wrong with "or do {...}"?
>
> I believe it is the best option sim
On Jul 21, 6:06 pm, shawnhco...@gmail.com (Shawn H Corey) wrote:
> On 11-07-21 08:54 PM, Rob Dixon wrote:
> ...
> I think part of the confusion is also in what does $ match? According
> to perlre, under "Regular Expressions",
>
> $ Match the end of the line (or before newline at the end
On Jul 20, 6:09 pm, shawnhco...@gmail.com (Shawn H Corey) wrote:
> On 11-07-20 07:03 PM, Uri Guttman wrote:
>
> > the other is a class method call. it has two major differences. first it
> > will pass its class (or object, the arg before ->) as the first arg in
> > the call. the second thing is tha
On Jul 20, 12:45 am, walde.christ...@googlemail.com ("Christian
Walde") wrote:
> On Tue, 19 Jul 2011 21:14:10 +0200, Tessio Fechine wrote:
> > Hello,
> > I have a subroutine that uses useradd to create accounts
>
> > --
> > @cmd = ('useradd', '-m', $account);
> > my $result = system @cmd;
> > --
>
On Jul 13, 11:17 pm, jwkr...@shaw.ca ("John W. Krahn") wrote:
> C.DeRykus wrote:
>
>...
>
> That won't work as the shell will interpolate away the backslash:
Not necessarily... it works on Win32's idea of a
"shell" for instance :)
But i
On Jul 13, 5:42 pm, tiago.h...@gmail.com (Tiago Hori) wrote:
> ...
> > C.DeRykus wrote:
> > There's already been a very good recommendation. But, if
> > you know your file has no irregularities, is surprise-free as
> > far as formatting, you may be tempted to j
On Jul 13, 9:59 am, tiago.h...@gmail.com (Tiago Hori) wrote:
> Hi All,
>
> I work with microarrays and get huge tab delimited files as outputs from the
> software that analysis these microarrays. The result is a tab-delimted Excel
> type of file that has 16 rows and about 20 columns.
>
> Every
On Jun 22, 12:49 pm, rco...@gmail.com (Rob Coops) wrote:
> On Wed, Jun 22, 2011 at 6:44 PM, josanabr wrote:
> ...
> Lets dissect this a little:
>
> Lets take the inner most thing ($var2) this is obviously a scalar (or a
> reference to another variable (I'll explain why I am betting it is a scalar
On Jun 18, 6:50 am, rvtol+use...@isolution.nl ("Dr.Ruud") wrote:
> On 2011-06-17 05:34, C.DeRykus wrote:
>
>
> > Ruud:
> >> C.DeRykus:
> >>> Ruud:
> >>>> C.DeRykus:
> >>>>> Another solution, not necessaril
On Jun 17, 6:39 am, paragka...@gmail.com (Parag Kalra) wrote:
> Hi,
>
> I have a requirement where I want to wait for user to input the data.
>
> However if user doesn't input the data within certain period of time then it
> should timeout and move ahead.
There's an example in the docs. See:
On Jun 16, 3:00 pm, rvtol+use...@isolution.nl ("Dr.Ruud") wrote:
> On 2011-06-16 19:16, C.DeRykus wrote:
>
>
>
> > Ruud:
> >> C.DeRykus:
> >>> Another solution, not necessarily more elegant, but
> >>> more familiar to most i
On Jun 16, 1:54 am, rvtol+use...@isolution.nl ("Dr.Ruud") wrote:
> On 2011-06-15 14:18, C.DeRykus wrote:
>
> > [...] mixing
> > alarm/sleep is a bad idea. See: perldoc -f alarm.
>
> > Another solution, not necessarily more elegant, but
> > more fam
On Jun 15, 11:21 am, noah-l...@enabled.com (Noah) wrote:
> Hi there,
>
> can somebody recommend a good tutorial web link and/or URL for learning
> perl forking please?
>
Presumably, you've already seen these docs:
perldoc perlipc
perldoc perlfork # fork emulation for non-Unix
Not the be
On Jun 14, 3:31 am, gator...@yahoo.de wrote:
> Hi,
>
> On 2011-06-14 09:23, gator...@yahoo.de wrote:
>
>
>
>
>
>
>
>
>
> > what I am trying to do is:
>
> > - run a little program, that just sleeps for a given time
> > - when it receives a signal, restarts sleeping again for the
> > full time peri
On Jun 5, 2:30 am, scottie...@gmail.com (Scottie) wrote:
> Hi!
> I'm stuck. Can you help me?
>
> After the backup by Oracle RMAN tool I parse the log file and create
> two hash tables:
>
> %channel = #It collects information specific to channels
> {ch1}
> ->[0] allocated channel: ch1
>
On Jun 3, 8:37 am, sono...@fannullone.us wrote:
> ...
> I want to use "$name" in another loop just after this one, but when I
> do, I get "Global symbol $name requires explicit package".
>
One option is an outer enclosing block that'll
extend the scope of $name to that entire block:
On May 25, 10:05 pm, jason.li...@gmail.com (Xi Liu) wrote:
> Hi all:
> I translated a program from c to perl.but the perl program cost 15 seconds
> compare to the original c one cost only less than 1 second, I guess this
> might be the result of I literally translated the program, using a lot of
>
On May 20, 4:37 am, cmksw...@gmail.com (Ambuli) wrote:
> Here i paste a perl script to delete last Two Lines. If you want
> delete more lines in a file you can specify it.
>
> use File::ReadBackwards;
> my $filename = 'test.txt';
> my $Lines_to_truncate = 2; # Here the line to truncate is mean Re
On May 11, 7:25 pm, siegfr...@heintze.com wrote:
> Darn -- I forgot to switch to plain text again. I hope this does not
> appear twice -- I apologize if it does!
>
> This works and produces the desired result (I've simplified it a bit):
>
> $default= `grep pat file-name`)[0])=~/[0-9]+/)[0]);
>
On May 11, 8:38 am, speedj...@googlemail.com (jet speed) wrote:
> Hi All,
>
> I need help in matching the regular expression, the file is as below.
>
> I am trying to match number followed by Number ex 587, 128 in $1 and
> 60:06:01:60:42:40:21:00:3A:AA:55:37:91:8A:DF:11 in $2
>
> the $1 match works
On May 10, 9:18 pm, u...@stemsystems.com ("Uri Guttman") wrote:
> > "CD" == C DeRykus writes:
>
> CD> On May 9, 1:29 pm, demianricca...@gmail.com (D) wrote:
> >> Hello everyone,
> >>
> >> I would like to learn an efficient way to change a single column in a
> >> file that is accessed
On May 9, 1:29 pm, demianricca...@gmail.com (D) wrote:
> Hello everyone,
>
> I would like to learn an efficient way to change a single column in a
> file that is accessed by an external program after the column is
> changed each time. open write close is what I have been using. I
> thought that t
On May 8, 6:29 am, g...@vi-anec.de ("g...@vi-anec.de") wrote:
> Hi,
>
> I want to read the content of a hidden folder like
>
> $path = '/home/user/.gnome2/folder/folder';
>
> in a list but with
>
> opendir(DIR, "$path") || die "folder not found" $!;
> ...
On May 3, 4:12 pm, rob.di...@gmx.com (Rob Dixon) wrote:
> On 03/05/2011 19:49, C.DeRykus wrote:
>
>
>
>
>
>
>
>
>
> > On May 2, 9:46 am, lm7...@gmail.com (Matt) wrote:
> >> Have a date:
>
> >> 2011-05-02-16:40:51
>
> >> Using
On May 3, 11:54 am, shawnhco...@ncf.ca (Shawn H Corey) wrote:
> On 11-05-03 02:49 PM, C.DeRykus wrote:
>
> > my @rounded_5mins = grep { not $_ % 5 } 0..60;
>
> my @rounded_5mins = map { $_ * 5 } 0..12;
>
> # TIMTOWTDI
>
Make that: TIMTOWTDI++ # a much better way t
On May 2, 9:46 am, lm7...@gmail.com (Matt) wrote:
> Have a date:
>
> 2011-05-02-16:40:51
>
> Using this to get it:
>
> $tm = gmtime;
> $time_stamp = sprintf "%04d-%02d-%02d-%02d:%02d:%02d",
> $tm->year + 1900, $tm->mon + 1, $tm->mday, $tm->hour, $tm->min, $tm->sec;
> print "$time_stamp\n";
>
> I n
On Apr 29, 2:39 am, u...@stemsystems.com ("Uri Guttman") wrote:
> > "RD" == Rob Dixon writes:
>
> RD> On 29/04/2011 10:27, Uri Guttman wrote:
>
> RD> Good call Brian. It's not at all obvious that all the elements of a hash
> RD> slice will be created if they don't exist :)
> >>
> >>
On Apr 28, 9:31 am, dthack...@gmail.com (Dave Thacker) wrote:
> Hi,
> I need to pull a file or files down every day that contain a specific
> string. Here's my code.
>
> #!/usr/bin/perl
> use strict;
> use Net::SCP;
>
> my $scp=' ';
> open (LOG, ">>/home/wesaysopost/logs/retrieve-wesayso-results.
On Apr 13, 4:07 pm, sono...@fannullone.us wrote:
> Hello,
>
> I read somewhere that it's bad practice anymore to call a subroutine
> like this:
>
> &subroutine();
>
Normally yes but there are a few circumstances
where you need the sigil. See: perldoc perlsub
> I've also read wh
On Apr 12, 11:10 pm, shlomit.af...@weizmann.ac.il ("Shlomit Afgin")
wrote:
> Hi
>
> I need to write regular expression that will capitalize the first letter of
> each word in the string.
> Word should be string with length that is greater or equal to 3 letters
> exclude the words 'and' and '
On Apr 11, 7:21 am, gklc...@googlemail.com (gkl) wrote:
> On Apr 10, 11:03 pm, jwkr...@shaw.ca ("John W. Krahn") wrote:
stion on regular expressions as my
> > > program is working fine but I was just curious.
>
> > > Say you have the following URLs:
>
> > >http://www.test.com/image.gif
> > >http://
On Apr 9, 1:04 pm, alanhag...@alanhaggai.org (Alan Haggai Alavi)
wrote:
> > ...
> > #!usr/bin/perl
>
> For increased portability, use the shebang #!/usr/bin/env perl
>
Hm, portable only in limited situations, risky,
and always slower.
From:
http://www.webmasterkb.com/Uwe/Forum.aspx/perl/3968/
On Apr 7, 2:07 am, paik...@gmail.com (Dermot) wrote:
> On 7 April 2011 00:24, C.DeRykus wrote:
>
>
>
>
>
>
>
>
>
> > On Apr 6, 7:45 am, paik...@gmail.com (Dermot) wrote:
> >> Hello All,
>
> >> I have a issue when I attempt to run a script o
On Apr 6, 7:45 am, paik...@gmail.com (Dermot) wrote:
> Hello All,
>
> I have a issue when I attempt to run a script on one host (B) that is
> called by ssh from other host (A).
>
> On host B, I have the script in /usr/local/bin/stuff.pl. The script
> has the following near the top:
>
> use strict;
On Mar 17, 3:44 pm, c...@pobox.com (Chap Harrison) wrote:
> On Mar 17, 2011, at 5:21 PM, Rob Dixon wrote:
>
> > A s///g is 'successful' if it performs at least one substitution, in which
> > case it will return the number of substitutions made. In your code, it will
> > find as many key=value sub
On Mar 17, 1:27 pm, c...@pobox.com (Chap Harrison) wrote:
> On Mar 17, 2011, at 1:49 PM, C.DeRykus wrote:
>
>
>
> > On Mar 16, 9:58 am, c...@pobox.com (Chap Harrison) wrote:
>
> >> #!/usr/bin/perl
>
> >> use warnings;
> >> use strict;
> >&
On Mar 16, 9:58 am, c...@pobox.com (Chap Harrison) wrote:
> Oops, I misplaced the final closing parenthesis in the regex. But it doesn't
> seem to matter.
>
> - - - - -
>
> #!/usr/bin/perl
>
> use warnings;
> use strict;
> use feature ":5.10";
>
> #
> # $line, unless empty, should contain one or
On Mar 2, 9:55 am, lm7...@gmail.com (Matt) wrote:
> I am looking for a simple way to test if a file does not contain a
> string. This is on a linux box.
>
> if myfile does not contain mystring {
> #do_something;
> }
>
> The file is basically a list of names and I want to test that a
> certain
On Feb 9, 10:07 pm, terry.p...@mail.ru (terry peng) wrote:
> hello,
>
> when in the case "return undef" I prefer just "return" coz in list context it
> will return an empty list.
>
> my $exist = ...
> if ($exist) {
> return 1;
>
> } else {
> return;
> }
>
> the code above can work, but hav
On Feb 5, 7:11 am, zavi...@gmail.com (zavierz) wrote:
> Hi, I am trying to modify a LaTex file which is plain text.
> The file contains lines similar to the following, but each line is
> followed by text, so that:
>
> Article 1 Cats
> Article 2 Dogs
> Article 3 Fish
> Article 4 Ferrets
>
> etc.
On Feb 3, 7:36 am, filip.sne...@gmail.com (Filip Sneppe) wrote:
> Hi,
>
> I am writing a script that executes external command that may hang.
> I want to capture all output produced by the external command and
> continue with my perl code after a certain execution timeout for the
> external program
On Jan 27, 3:29 am, jinstho...@gmail.com (Jins Thomas) wrote:
> On Thu, Jan 27, 2011 at 4:44 PM, C.DeRykus wrote:
> > On Jan 26, 11:28 pm, jinstho...@gmail.com (Jins Thomas) wrote:
>
> > > Hi DeRykus
>
> > > Sorry for replying late.
>
> > > I was ab
On Jan 27, 1:51 am, r@aist.go.jp (Raymond Wan) wrote:
> Hi all,
>
> I was wondering if there is a way for Perl to give me a warning if I
> redeclare a variable in a different scope (and thus masking the outer
> one). Just spent some time debugging this (which was obviously not my
> intention t
On Jan 26, 11:28 pm, jinstho...@gmail.com (Jins Thomas) wrote:
> Hi DeRykus
>
> Sorry for replying late.
>
> I was able to test DB_File with your example, thanks. But i'm facing
> a problem. I'm not able to access multi dimensional array with this
> DB_File. Address is being stored just a string.
On Jan 21, 9:03 am, perl-l...@christophfriedrich.de wrote:
> Hi there,
>
> I'm using the FCGI module (version 0.67) and a lighttpd
> to create an imageserver.
>
> But currently I have the problem that if I
> shutdown the lighttpd server, the perl processes are still there with an
> open file descri
On Jan 20, 9:40 am, cstinem...@cricketcommunications.com (Chris
Stinemetz) wrote:
> I am having difficulty using $= correctly to change the number of lines per
> page. I would like to set it to 600 but can't seem to get $= =600 to work
> correctly.
>
> Any insight is greatly appreciated.
>
> Than
On Jan 17, 3:45 pm, dpchr...@holgerdanske.com (David Christensen)
wrote:
> Ron Bergin wrote:
> > It's interesting that you found the warning message to be meaningless,
> > but the exact same message was helpful when you told the pragma to
> > raise the level of warnings to be fatal.
> > I should ha
On Jan 12, 8:27 pm, sunita.prad...@altair.com ("Sunita Rani Pradhan")
wrote:
> Hi All
>
> I have a string as; $str = "the cat sat on the mat" .
>
> How the following command works substr($str , 4, -4) on the string ?
> What should be the output?
>
See: perldoc -f substr
Check the do
On Jan 5, 10:56 pm, jinstho...@gmail.com (Jins Thomas) wrote:
> Hi experts,
>
> Have you ever experienced Out of memory problem while using
> HTML::TableExtract. I'm having little large html files, still i didn't
> expect this to happen
>
> Would you be able to suggest some workarounds for this. I'
On Jan 5, 10:56 pm, jinstho...@gmail.com (Jins Thomas) wrote:
> Hi experts,
>
> Have you ever experienced Out of memory problem while using
> HTML::TableExtract. I'm having little large html files, still i didn't
> expect this to happen
>
If the html files are really big, HTML::TableExtract might
On Jan 5, 5:44 am, sunita.prad...@altair.com ("Sunita Rani Pradhan")
wrote:
> Hi All
>
> Could you please let me know , if anybody using any automation framework
> for their automation testing or any types information about automation
> framework ?
>
> Note: Perl scripting should be used in that fr
On Dec 27, 2:34 pm, paragka...@gmail.com (Parag Kalra) wrote:
> Hi,
>
> I was under the impression that regex modifier '/x' ignores the white
> space. So in following script both the if-else blocks should print
> "Match" since the strings differ only in white space and '/x' should
> ignore the whit
On Dec 25, 2:21 am, shlo...@iglu.org.il (Shlomi Fish) wrote:
> -- Forwarded Message --
>
> Subject: Re: Writing 3D games with Perl... How's the Performance?
> Date: Friday 24 December 2010, 12:43:11
> From: Shlomi Fish
> To: beginn...@perl.org
> CC: "U.N."
>
> [snip]
>
> > I
On Dec 16, 2:56 am, practicalp...@gmail.com (practicalperl) wrote:
> This has been confused me:
>
> [an...@localhost tmp]$ ls
> [an...@localhost tmp]$ perl -le'print glob("foo.3")'
> foo.3
>
> there is nothing in the tmp directory.
> but why glob("foo.3") returns the string?
>
> $ perl -v
>
> This
On Dec 15, 8:05 am, redt...@gmail.com (Mike Martin) wrote:
> Hi
>
> I am trying pass a perl one-liner to at intact eg:
>
> echo 'perl -mLinux::DVB::DVBT -e 'my
> $dvb=Linux::DVB::DVBT->new(O_NONBLOCK,'O_RDONLY');$dvb->set_frontend('frequency'
> => '497167000','tsid' => '4222');my $file="/storage/bu
On Dec 9, 10:00 am, ag4ve...@gmail.com (shawn wilson) wrote:
> i decided to use another module to get my data but, i'm having a bit
> of an issue with xpath.
>
> the data i want looks like this:
>
>
>
>
> name
> attribute
>
> name2
> attribute2
>
> possible name3
> possible
On Dec 7, 9:38 am, p...@utilika.org (Jonathan Pool) wrote:
> > Well, I have no idea why it does what it does, but I can tell you how to
> > make it work:
> > s¶3(456)7¶¶$1¶x;
> > s§3(456)7§§$1§x;
>
Oops, sorry, yes there is:
c:\>perl -Mutf8 -wE
"say $^V,$^O;$_='123456789';s§3(456)7§$1§;say"
On Dec 7, 9:38 am, p...@utilika.org (Jonathan Pool) wrote:
> > Well, I have no idea why it does what it does, but I can tell you how to
> > make it work:
> > s¶3(456)7¶¶$1¶x;
> > s§3(456)7§§$1§x;
Oops. yes there is:
c:\>perl -Mutf8 -wE
"say $^V,$^O;$_='123456789'; s§3(456)7§$1§;say"
Malform
On Dec 7, 9:38 am, p...@utilika.org (Jonathan Pool) wrote:
> > Well, I have no idea why it does what it does, but I can tell you how to
> > make it work:
> > s¶3(456)7¶¶$1¶x;
> > s§3(456)7§§$1§x;
>
Hm, what platform and perl version?
No errors here:
c:\>perl -wE "say $^V,$^O;$_='1234567
On Nov 29, 4:33 am, bourne.ident...@hotmail.com (Manish Jain) wrote:
> [...]
> print(hndw, $nextline); #problem here
>
> }
>
> But perl refuses to take a comma between hndw and $nextline, and consequently
> I have to rewrite it as : print hndw $nextline;
>
That's because 'pri
On Nov 23, 8:29 am, learn.tech...@gmail.com (Amit Saxena) wrote:
> Hi all,
>
> What's the best way to monitor ssh connectivity, and not just ssh port
> availability, to a server using perl assuming following constraints ?
>
> I tried for Net::SSH but public private key is not allowed.
>
> I tried f
On Nov 16, 1:54 pm, vincent.mc...@gmail.com (Vincent Li) wrote:
> On Tue, Nov 16, 2010 at 1:11 PM, Shawn H Corey wrote:
>
> > On 10-11-16 04:07 PM, Vincent Li wrote:
>
> >> My aim is to remove specific profile.*{} block from that file
>
> > Yes, but if the {} blocks are nestable, then you can't do
On Nov 14, 1:11 am, shlo...@iglu.org.il (Shlomi Fish) wrote:
> Hi Charles,
>
> On Sunday 14 November 2010 01:47:36 C.DeRykus wrote:
>
> > On Nov 11, 11:27 pm, c...@pobox.com (Chap Harrison) wrote:
> > Not lots shorter but you could use a closure to hide
> > the calcul
On Nov 13, 3:47 pm, dery...@gmail.com ("C.DeRykus") wrote:
> On Nov 11, 11:27 pm, c...@pobox.com (Chap Harrison) wrote:
>
>
>
> > I'm almost embarrassed to ask this, but I can't figure out a simple way to
> > construct a switch ('given') state
On Nov 11, 11:27 pm, c...@pobox.com (Chap Harrison) wrote:
> I'm almost embarrassed to ask this, but I can't figure out a simple way to
> construct a switch ('given') statement where the 'when' clauses involve
> bit-testing.
>
> Here's the only way I've figured out to build a switch statement tha
On Nov 4, 2:16 am, christian1...@gmx.net ("Christian Stalp") wrote:
> Hello together,
> I try to write some arrays into arrays using references.
>
> my ($a, $b, $c, @mytemp, $myref, @my_globael_array)
>
> while(<$myfile>)
> {
> ($a, $b $c ) = getparameter();
> �...@mytemp = ($a, $b, $c);
>
On Nov 2, 5:06 pm, bryan_r_har...@raytheon.com (Bryan R Harris) wrote:
> I have these lines in my script:
>
> **
> for my $handle (*STDIN, *STDERR) {
> open($handle, "+ /dev/null: $!. Exiting.\n";
>
> }
>
> # open outfile for further recording
> open(STDOUT,
On Nov 2, 3:50 am, h...@risoe.dtu.dk ("Larsen, Henning Engelbrecht")
wrote:
> I want to search a string for patterns but starting the search from the
> _end_ instead of from the beginning, using a regular expression.
>
> For instance I want to find the last 'E' in the string
>
> ...looong string po
On Oct 23, 2:37 pm, da...@davidfavor.com (David Favor) wrote:
[omitted]
> > Just be sure you know what you are doing. Adding a method to somone else's
> > class can be considered rude. See the NOTE in perldoc perlmodlib.
>
> sub add_class_method {
> my($class,$name,$code) = @_;
> no
On Oct 25, 9:21 am, simssa...@gmail.com (saran) wrote:
> i am new to perl. please help me with this piece of code below.
> answer wat it prints is correct but the format has to adjusted...!
> program to convert Celsius to Fahrenheit
>
On Oct 23, 2:37 pm, da...@davidfavor.com (David Favor) wrote:
> Paul Johnson wrote:
[snip]
> add_class_method($class,$name,$code);
>
> # all three of these invocations works correctly
> test_method($self);
> &$code($self);
> $self->test_method;
>
> }
Hm, strawberr
On Oct 13, 9:40 am, mike.j...@nethere.com (Mike McClain) wrote:
> On Wed, Oct 13, 2010 at 08:33:57AM +0200, Shlomi Fish wrote:
>
>
>
> > On Wednesday 13 October 2010 06:39:03 Mike McClain wrote:
> > > Why do @arrays and @seconds not have the same number of elements?
> > > my @arrays =
> > >
On Sep 30, 9:07 pm, jon.herman...@gmail.com (Jon Hermansen) wrote:
rg/>
>
> ...
>
> Thanks for the help. I was able to find a few workarounds with your
> examples. I found something interesting in my testing-- at the end of my
> sub, if instead of:
>
> return 1 unless ($@);
>
>
> I use:
>
> if (no
On Sep 30, 5:19 am, irfan_sayed2...@yahoo.com (Irfan Sayed) wrote:
> Hi,
>
> I am using net::ssh module of Perl to connect to remote machine and execute
> some
> remote commands
> i can connect using user-name and password hard coded in the script like
> below:
>
> #!/usr/local/bin/perl
>
> use s
On Sep 30, 7:37 pm, jon.herman...@gmail.com (Jon Hermansen) wrote:
> Hey all,
> I have this block of code:
>
> sub is_valid_xml {
>
> > my ($content) = @_;
>
> > eval {
> > my $xs = XML::Simple->new();
> > my $ref = $xs->parse_string($content);
> > };
>
> > return 1
On Sep 23, 9:42 am, soorajspadmanab...@gmail.com (Sooraj S) wrote:
> Hi,
>
> In my perl script p1 i am calling another script p2 which logs into a
> remote machine and executes a script p3. The $file defined in p3 does
> not exist. So copy operation in p3 will error out with error code 256
> and p3
On Sep 22, 11:04 am, gk.kalipuray...@gmail.com (Gopal Karunakar)
wrote:
> Hi,
>
> Here's the code pasted below. The sub basically executed an anonymous
> pl/sql block (which is executing fine). I want to make sure that the user
> will not be able to a ctrl-c and exit at the stage where the sql s
On Sep 22, 6:53 am, gk.kalipuray...@gmail.com (Gopal Karunakar) wrote:
> I used the $SIG{'INT'} = 'IGNORE'; in a sub in my script so that the
> script while executing the particular sub will ignore the ctrl-c. And I gave
> $SIG{'INT'} = 'DEFAULT'; at the end of the sub to reset the behavio
On Sep 21, 3:16 am, shlo...@iglu.org.il (Shlomi Fish) wrote:
> A few comments about this code (which is derived from the old code):
>
> On Tuesday 21 September 2010 08:40:41 Jon Hermansen wrote:
>
> > Hi Abu,
> > This code works for me:
>
> > #!/usr/bin/perl
>
> Add strict and warnings:
>
> http:/
On Sep 14, 2:52 am, soorajspadmanab...@gmail.com (Sooraj S) wrote:
> Hi,
>
> My perl script internally calls some other scripts. The execution time
> of the script is 5 min. I dont want any user to stop or suspend the
> execution. ie I want my script to ignore the (ctrl+z) and (Ctlr+c)
>
> By addin
On Sep 2, 10:11 am, lel...@claimspages.com ("Lonnie Ellis") wrote:
> You can also turn on the telnet service within Windows rather than using
> SSH. If you want to use SSH, openSSH is a good alternative for Windows,
> but you'll have to install Cygwin on the Windows box. Google it, you
> should f
On Aug 29, 10:46 pm, ole...@gmail.com (marcos rebelo) wrote:
> We are out of contest in here.
>
> I know how to run open3, but I don't know how to test it. Repeating
>
Hm, I just wanted to warn you that Open3 may
easily require more paranoia than you've shown...
your sample is simple enough to es
27;ll very likely want to use IO::Select
to marshal when the read's occur and search for some sample
code.
>
> On Sun, Aug 29, 2010 at 6:08 AM, John W. Krahn wrote:
>
>
>
> > C.DeRykus wrote:
>
> >> Since you mention simplifying the code, do you actually
> &g
On Aug 28, 12:45 am, ole...@gmail.com (marcos rebelo) wrote:
> I'm having a more or less complicated code, that was simplified to this.
>
> use strict;
> use warnings;
> use IPC::Open3;
> use IO::Handle;
> use Test::More;
> use Test::Trap;
>
> sub shell_run {
> my ($stdin, $stdout, $stderr) = m
On Aug 24, 12:28 pm, frase...@gmail.com (Brian Fraser) wrote:
> On Tue, Aug 24, 2010 at 11:08 AM, Peter Scott wrote:
> > CPAN: Net::SSH::Perl .
>
> I had a similar issue not too long ago; Spent a couple of days attempting to
> get Net::SSH::Perl to compile properly, gave up, went to CPAN, found
>
On Aug 17, 1:35 am, nora.hac...@stgkk.at ("HACKER Nora") wrote:
> Hi,
>
> Sorry for the late answer, I was kept busy at work and had no time to
> dig in ...
>
> > IIUC, couldn't you just set oraenv directly at runtime:
>
> > $oraenv = "$w_conf/ora$orapat.env"; # coalesce path + filename
> >
On Aug 14, 6:28 am, dery...@gmail.com ("C.DeRykus") wrote:
> On Aug 13, 1:47 pm, tobias.wage...@googlemail.com (irata) wrote:
>
>
>
>
>
> > I want to replace in a javscript structure like the one below every
> > occurence of "{#...}", "{?...}&
On Aug 13, 1:47 pm, tobias.wage...@googlemail.com (irata) wrote:
>
> I want to replace in a javscript structure like the one below every
> occurence of "{#...}", "{?...}", "{+...}" and "{=...}" through
> something different (also nested):
> function() {
> test1 = "{#Caption}";
> tes
On Aug 10, 8:43 am, r...@i.frys.com (Ron Bergin) wrote:
> While doing some benchmark testing on both Windows and Linux, the
> results of the exact same code was reversed. A slight difference in
> the percentages is understandable, but I fail to see why the results
> would be reversed. Could someo
On Aug 8, 5:40 pm, student.northwest...@gmail.com (Jim Green) wrote:
> Hi,
> I used to use find, a for loop and awk to extract data from a list of
> files returned by find.
>
> Now I want to use file::find and perl to this.
>
> use vars qw/*name *dir *prune/;
> *name = *File::Find::name;
> *d
On Aug 3, 7:10 am, chas.ow...@gmail.com ("Chas. Owens") wrote:
> On Tue, Aug 3, 2010 at 09:47, Chas. Owens wrote:
> > On Tue, Aug 3, 2010 at 08:44, Shawn H Corey wrote:
> >> On 10-08-03 06:43 AM, Rob Coops wrote:
>
> >>> Third you could of course when you are printing the values from the array
>
1 - 100 of 198 matches
Mail list logo