2011/3/7 Rob Dixon :
> On 07/03/2011 18:24, Jay Savage wrote:
>>
[snip]
> It is certainly not a 'solved problem', or the paper that you
> (indirectly) refer to would not have been written. What you are doing is
> non-trivial, but is described in detail in the paper
Hi all,
I'm working on a project to to track changes to text files over time.
The goal is build of a data set that tags or tokenizes each word in
the file with version where it was introduced. Basically I want to
create data that could drive something similar this:
http://hint.fm/projects/historyf
On Fri, Feb 11, 2011 at 5:38 AM, mailing lists wrote:
>>> 12 $sheet -> {MaxRow} ||= $sheet -> {MinRow};
>>
>>Line 12 can be written as:
>>$sheet->{'MaxRow'} = $sheet->{'MaxRow'} || $sheet->{'MinRow'};
>
>
> then that I don't understand is the program logic :-(
>
> what's the purpose of line
On Fri, May 14, 2010 at 7:26 AM, Tom wrote:
> On Fri, May 07, 2010 at 12:44:01PM -0400, Bob McConnell wrote:
>> From: Tom
>>
>> > I'm having trouble merging YAML streams.
>> >
>> > Basic premise is that I load multiple YAML files and I want to combine
>> > the result. There may be common elements
On Sat, May 1, 2010 at 7:45 AM, Philip Potter wrote:
> On 1 May 2010 12:15, Paul wrote:
>> Hello all. How can I test to see if a number is divisible by say, 40?
>> Thanks.
>
> Use the modulo operator %. Given integers $x and $y, the expression $x
> % $y gives the remainder when $x is divided by
On Wed, Mar 24, 2010 at 5:15 AM, Philip Potter
wrote:
> On 24 March 2010 00:56, Eric Veith1 wrote:
>> Sam wrote on 03/23/2010 11:18:11 PM:
>>> Could you use a file of random data? You can create one of those really
>>> easy: dd if=/dev/urandom of=ranfile bs=
>>
>> Theoretically, yes, of cour
On Wed, Mar 10, 2010 at 8:43 PM, Steve Bertrand wrote:
> Hi all,
>
> I've got a module that has a significant number of unit tests for each
> sub, each within its own file:
>
> acct-dev: ISP-RADIUS % ls t | grep daily
> 07-aggregate_daily.t
>
> Within the overall package, I've included a few utili
On Wed, Mar 10, 2010 at 12:36 PM, Kelly Jones
wrote:
> How do I easily model first-in-first-out (FIFO) financial transactions
> in Perl? Example:
>
> % I buy 100 shares of XYZ for $8/share on Day 1, another 100 shares
> for $9/share on Day 2, and another 100 shares for $10/share on Day 3.
>
> %
On Wed, Mar 10, 2010 at 5:56 AM, HACKER Nora wrote:
> Hi list,
>
> I want to use the Env::Sourced module for setting some environment
> variables depending on the Oracle version of a certain database:
>
> ~ ~ ~~ ~ ~~ ~ ~~ ~ ~~ ~ ~~ ~ ~~ ~ ~~ ~ ~~ ~ ~~ ~ ~~ ~ ~~ ~ ~~ ~ ~~ ~ ~~
> ~ ~~ ~ ~~ ~ ~~ ~ ~
On Mon, Mar 8, 2010 at 10:27 AM, Eric Veith1 wrote:
> "Bob McConnell" wrote on 03/05/2010 08:22:23 PM:
>> The way I read his problem description, it sounded neither simple nor
>> easy.
>
> Bob, Jay,
>
[snip]
> You see, there's IPC on the local machine and possibly sockets to a remote
> machine.
On Sat, Mar 6, 2010 at 8:39 AM, Peter Scott wrote:
> On Fri, 05 Mar 2010 11:42:34 -0500, Jay Savage wrote:
>
>> On Thu, Mar 4, 2010 at 2:12 PM, YAPH
>> wrote:
>>
>>> I got a perl script that begins like this.
>>>
>>>
>>> #!/usr/bi
On Wed, Mar 3, 2010 at 8:28 AM, Bob McConnell wrote:
[snip]
>
> However, if the application is this complex, is Perl really the best
> language to use? It would not be my first choice.
>
That is a very strange statement to make on a Perl beginners list, not
least because it's complete bosh.
Wha
On Thu, Mar 4, 2010 at 2:12 PM, YAPH wrote:
> I got a perl script that begins like this.
>
> -
> #!/usr/bin/sh -- # -*- perl -*-
>
> eval 'ORACLE
On Fri, Feb 19, 2010 at 10:34 PM, Bryan R Harris
wrote:
>
>
>>
>>> Is there any way to keep perl's eval from interpreting numbers starting
>>> with
>>> "0" as octal?
>>
>> Stringify them ?
>> 2 * '012' is 24.
>
> Manually?
>
> We could have thousands of them. How do I stringify them when they may
On Tue, Feb 9, 2010 at 8:05 PM, Dr.Ruud wrote:
> Jay Savage wrote:
>
[snip]
> Because $@ is a global, it is best practice to act on
> the return value of eval itself:
[snip]
$@ is also *guaranteed*--in the words of perlfunc--to be set
correctly. I believe that historically this
On Wed, Feb 3, 2010 at 9:22 PM, Tony Esposito
wrote:
> This question has never been answered. To out it another way, given the code
> ...
>
> foreach my $mytable (@mytables) {
> my $sth = $dbh->prepare("SELECT COUNT(*) FROM mytable");
> # report error but move on to next table
> }
>
> how do
On Tue, Dec 1, 2009 at 3:36 PM, David Schmidt wrote:
[snip]
>
> The actual problem is:
> All the visitors have to be put in one of 4 groups. So for the first
> 10 minutes visitors go to group #1, next 10 minutes to group #2,
> ...when all 4 groups have been treated I want to calculate the new
> "o
On Mon, Nov 30, 2009 at 1:42 PM, David Schmidt wrote:
> On Mon, Nov 30, 2009 at 5:57 PM, John W. Krahn wrote:
>> David Schmidt wrote:
>>> Yes my program has to continue while waiting for the timeout.
>>> You code example doesn't work for me because my program is an entire
>>> Catalyst applicatio
On Mon, Nov 30, 2009 at 10:45 AM, David Schmidt wrote:
> Hello
>
> I would like to execute some Code after a certain amount of time has
> passed (then restart the timer but with a different time value)
> I looked at IO::Async::Timer::Countdown but this timer only gets
> started when used with a IO
On Fri, Nov 27, 2009 at 6:29 AM, Shlomi Fish wrote:
[snip]
>> Hi Marco,
>>
> [snip]
>
> Net::IRC - DEPRECATED Perl interface to the Internet Relay Chat protocol
> USE THESE INSTEAD ^
>
> This module has been abandoned and is no longer developed. This release serves
> only to warn current and futu
On Mon, Nov 23, 2009 at 11:08 AM, Steve Bertrand wrote:
> Hi everyone,
>
> I'm curious to know if there is an easy way to scan a list of module
> files and identify how many subs are calling a different specific sub.
>
> I've got a method that must be called once by each and every sub within
> the
On Mon, Nov 9, 2009 at 9:22 PM, Matthew Sacks
wrote:
>
> I am unabashedly posting a quiz question I have about regular expressions:
>
> Looking for suggestions.
>
> I am thinking
>
> 1) make the set of regular expressions into one big expression?
> 2) search the seach strings, somehow, for common
On Mon, Nov 9, 2009 at 10:25 AM, axr0284 wrote:
> Hi,
> I am completely stumped with how to proceed with this.
> I have a program where the user inputs a path to a file. This is under
> windows xp
>
> The path can be relative
> ..\..\..\synthesis\int_code.psm
> .\program\synthesis\int_code.psm
>
On Fri, Jul 24, 2009 at 4:54 AM, Shawn H. Corey wrote:
[snip]
> Unfortunately, the data is not directly sortable since the date is in
> American format, not Système International (SI). SI dates are directly
> sortable and are the preferred format for storing dates.
>
> I would use a heap to sort
On Tue, Jul 21, 2009 at 9:25 AM, Shawn H. Corey wrote:
> John W. Krahn wrote:
[snip]
close(STDERR);
open(STDOUT , '>') || die "Unable to open STDOUT: $!";
>>>
>>> You're not opening STDOUT to anything. And you closed STDERR so the die
>>> message can't go anywhere. In fact
On Tue, May 26, 2009 at 11:51 AM, Downs, John wrote:
>
>
>> Greetings!
>>
>> Has anyone got this to work? I can build it but it
>> fails miserable on test and will not install. I get a lot of the
>> below messages. Any ideas??
>>
>> -john
>>
>> Below is the config arguments.
On Fri, Apr 24, 2009 at 3:53 PM, Chas. Owens wrote:
> 2009/4/24 Jay Savage :
> snip
>>> Hmm, I don't think it would reparse the whole file, but
>>> it does run in a BEGIN block...hmm, I must test it.
>>>
>>
>> It runs in a begin block, but
please don't top post...
On Thu, Apr 23, 2009 at 2:18 PM, Vance E. Neff wrote:
> Well it turns out that error was caused by some other problem. I did
> not realize that "our" was not a function. So you can't do something
> like this:
> our $variable = "value1" if (something is true);
> our $
On Wed, Apr 22, 2009 at 6:12 PM, Chas. Owens wrote:
> On Wed, Apr 22, 2009 at 17:54, Gunnar Hjalmarsson wrote:
>> Chas. Owens wrote:
>>>
>>> On Wed, Apr 22, 2009 at 15:25, Gunnar Hjalmarsson
>>> wrote:
>>> snip
>>> The utf8 pragma affects the whole file,
>>
>> Well, only the part of the file th
On Mon, Apr 20, 2009 at 6:14 PM, Robert Citek wrote:
> Hello all,
>
> I am giving a presentation soon and will be talking a bit about perl.
> I'd like to include an image about perl that describes it as the Swiss
> army chainsaw. Ideally, I'd like to have a red chainsaw with the
> white Swiss cro
On Thu, Apr 16, 2009 at 8:32 AM, Michael Alipio wrote:
>
> 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 (/patter
On Wed, Apr 15, 2009 at 10:02 AM, Chas. Owens wrote:
> On Wed, Apr 15, 2009 at 09:38, wrote:
>> Greetings,
>>
>>
>> What's the easy way to calculate a webpage's downloading time?
>> (not only the page, but all the elements in this page, like images,
>> JS, css etc).
>> For example, I want to get
On Tue, Mar 17, 2009 at 8:16 AM, Dermot wrote:
> Hi All,
>
> I am unsure if the following statement is going to do what I want.
>
> I want to test if there is a value in $hash_ref{'someval'} NOT if the
> key is defined. I'd also like to avoid un-sightly "undefined value"
> errors.
Hi Dermot,
It
Hi All,
I was wondering if someone could point me toward a useful comparison
of Class::DBI and DBIx::Class. Going through the docs, they seem to be
much of a muchness. Are there any clear advantages to DBIxC? I'm
porting a (Maypole-based) webapp to new environment, and I'm toying
with the idea of
On Sun, Jan 4, 2009 at 11:45 AM, Bob goolsby wrote:
> Not 'wrong headed', just a compiler compiler optimization. By putting
> the declarations before the usage, you reduced the number of complete
> passes through the source by one and made the parsing code easier.
> This is an artifact from the t
On Mon, Dec 22, 2008 at 12:36 PM, Patrick Kirsch
wrote:
> Mr. Shawn H. Corey schrieb:
>> On Mon, 2008-12-22 at 18:10 +0100, Patrick Kirsch wrote:
>>
>>> Is there a possibility to influence it, to free memory (in the sense
>>> of
>>> give it back to the OS)?
>>>
>>>
>>
>> Does your OS have a functi
On Fri, Dec 19, 2008 at 3:24 PM, Collaborate wrote:
> I have an application that requires cursor/pointer control as follows:
>
> I would like to move the cursor to a specific target location on a web
> page and then click on a link. I would also like to be able to enter
> text into boxes after mov
On Mon, Dec 1, 2008 at 10:18 PM, David <[EMAIL PROTECTED]> wrote:
> Thank you to all who helped me get a 6 digit date into perl. I certainly
> heed warnings about not using outside system calls in perl however, I have
> to make an outside call again.
>
>
>
> #!/usr/bin/perl -w
> use strict;
>
> my
On Sat, Nov 22, 2008 at 10:28 AM, ben perl <[EMAIL PROTECTED]> wrote:
> Is there a perl module to find cumulative in a column? It should subtract
> from the previous row and creates new column.
>
> For example, If i have the follow column in my file
>
> 2
> 6
> 9
>
> It gives me
>
> 2
> 6-2 = 4
> 9
On Mon, Nov 17, 2008 at 10:13 AM, Sharan Basappa
<[EMAIL PROTECTED]> wrote:
>>
>> You haven't installed anything. You've downloaded and untarred/
>> gunzipped the source. You still have to run
>> perl Makefile.PL
>> make
>> make test
>> make install
>>
>> That final command will copy the installe
On Thu, Nov 13, 2008 at 7:08 AM, Mr. Shawn H. Corey
<[EMAIL PROTECTED]> wrote:
> On Wed, 2008-11-12 at 21:17 -0500, Jay Savage wrote:
>> the only thing you are using the pragma to control is
>> whether the substitution happens at compile time or run time. In most
>> ca
On Wed, Nov 12, 2008 at 4:10 PM, JC Janos <[EMAIL PROTECTED]> wrote:
> Chas,
>
> On Wed, Nov 12, 2008 at 12:38 PM, Chas. Owens <[EMAIL PROTECTED]> wrote:
>> You may want to also look at Readonly*.
>
> New one for me. Thanks.
>
>> $WHOIS1 can be modified (not good)
>
> That's an easy point.
>
>> $W
On Tue, Nov 11, 2008 at 9:52 AM, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
> Hi I am new to this group and to Perl.
>
[snip]
> #!/usr/bin/perl -w
> use strict;
>
If you really have warnings enabled, you should be seeing lots of
warnings like "bareword found where operator expected" pointing a
On Mon, Oct 27, 2008 at 7:32 AM, Brian <[EMAIL PROTECTED]> wrote:
> Hello again
>
> Not too sure how to pose this question, but here goes.
>
> Working on an html page.
> There are many blocks of code placed between and in the page.
>
> The block(s) I am playing with have seven lines of code place
On Thu, Oct 9, 2008 at 6:04 AM, Peter Scott <[EMAIL PROTECTED]> wrote:
> On Wed, 08 Oct 2008 04:59:19 -0700, John W. Krahn wrote:
>> oldyork90 wrote:
>>> I am using a module having documentation saying document() is a
>>> method. However, I see it used as
>>>
>>> $o->document;
>>>
>>> Can you refe
On Wed, Oct 8, 2008 at 11:24 AM, Rob Dixon <[EMAIL PROTECTED]> wrote:
> Jay Savage wrote:
>> On Tue, Oct 7, 2008 at 4:09 PM, Rob Dixon <[EMAIL PROTECTED]> wrote:
>>> John W. Krahn wrote:
>>>>
>>>> Incorrect, delete does not remove array eleme
On Tue, Oct 7, 2008 at 4:09 PM, Rob Dixon <[EMAIL PROTECTED]> wrote:
> John W. Krahn wrote:
[snip]
>> Incorrect, delete does not remove array elements:
>>
>> $ perl -le'use Data::Dumper; my @a = "a".."d"; delete $a[1]; print
>> Dumper [EMAIL PROTECTED]'
>> $VAR1 = [
>>'a',
>>
On Mon, Sep 29, 2008 at 10:21 PM, loke <[EMAIL PROTECTED]> wrote:
> On Sep 29, 11:03 am, [EMAIL PROTECTED] (Paul Lalli) wrote:
>> On Sep 28, 3:18 pm, [EMAIL PROTECTED] (Loke) wrote:
>>
>> > Hi. I am trying to filter strings which do not have :// in them, I am
>> > able to find strings with :// but
On Wed, Sep 24, 2008 at 10:55 PM, Stephen Reese <[EMAIL PROTECTED]> wrote:
>> Have a look at the sample data you posted and you will see where.
>>
>>
>> John
>
> I believe I found where the ']' needs to go but didn't see any extra ' '
> space.
>
> The $x count seems off. As I see it every time a re
On Thu, Jul 10, 2008 at 8:48 AM, Stephen Kratzer <[EMAIL PROTECTED]> wrote:
>
> Anirban,
>
> The output of 'w' is delimited by whitespace, not necessarily a single space.
> Try passing the pattern '\w+' to split. Something like this:
>
I think you meant "the '\s+' pattern".
-- j
-
On Thu, Jul 10, 2008 at 5:59 AM, Anirban Adhikary
<[EMAIL PROTECTED]> wrote:
> Dear list
> I want to capture the output of w and then I want to do some job as per the
> o/p of w command in my linux system. So i have written the code as follows
>
> open (LS, "w|") or die "can't open w: $!";
> my @ar
On Sun, Jul 6, 2008 at 6:57 PM, Noah <[EMAIL PROTECTED]> wrote:
> Hi there fellow PERL coders.
>
> I am trying to match lines between a template file and a configuration file.
> If the configuration is missing a particular line that is found in the
> template file then it is printed. If the confi
On Tue, Jul 8, 2008 at 10:52 AM, Gunnar Hjalmarsson <[EMAIL PROTECTED]> wrote:
> Rob Dixon wrote:
>>
>> Noah wrote:
>>>
>>> Rob Dixon wrote:
Then I guess you are processing a file that originated on a Windows
system?
Windows text files have a sequence at the end of each record,
On Mon, Jul 7, 2008 at 2:24 PM, Octavian Rasnita <[EMAIL PROTECTED]> wrote:
> From: "Jay Savage" <[EMAIL PROTECTED]>
>>
>> On Sun, Jul 6, 2008 at 4:37 AM, Octavian Rasnita <[EMAIL PROTECTED]>
>> wrote:
>>>
>>> Hi,
>>>
&
On Sun, Jul 6, 2008 at 4:37 AM, Octavian Rasnita <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Does anyone know if there is a perl module that can be used for recording in
> .wav format?
> (One that can be used under both Linux and Windows, or at least under
> Windows.)
>
> Thank you.
>
> Octavian
>
Record
On Tue, Jul 1, 2008 at 11:30 AM, Gunnar Hjalmarsson <[EMAIL PROTECTED]> wrote:
> Thomas Bätzler wrote:
>>
>> Gunnar Hjalmarsson <[EMAIL PROTECTED]> wrote:
>>>
>>> Some would suggest the use of the FindBin module. It does the right
>>> thing, but unfortunately it is known to be buggy.
>>
>> Actually
On Fri, Jun 20, 2008 at 4:52 PM, Bryan R Harris
<[EMAIL PROTECTED]> wrote:
>
>> Bryan R Harris wrote:
>>>
>>> John W. Krahn wrote:
Bryan R Harris wrote:
>
> John W. Krahn wrote:
>>
>> The left hand side of the assignment determines context so the @l2r{...}
>> part.
>>>
On Thu, Jun 19, 2008 at 1:20 AM, luke devon <[EMAIL PROTECTED]> wrote:
> Dear Friends,
>
> In squid URL-rewriting , I wanted to add some third party
> parameters to the URL and wanted to filtered out IP which assigned for
> client ( Client -IP ). Rather than having a shell script , I supposed to do
On Wed, Jun 18, 2008 at 4:25 PM, Jenda Krynicky <[EMAIL PROTECTED]> wrote:
> Rob Dixon wrote:
>> Gunnar Hjalmarsson wrote:
>> > Rob Dixon wrote:
>> >> Gunnar Hjalmarsson wrote:
>> >>> swaroop wrote:
>>
>> As we know there are 3 ways a system shell command to be executed.
>>
>> 1
On Wed, Jun 18, 2008 at 4:40 AM, Rob Dixon <[EMAIL PROTECTED]> wrote:
> Gunnar Hjalmarsson wrote:
>> Rob Dixon wrote:
>>> Gunnar Hjalmarsson wrote:
swaroop wrote:
>
> As we know there are 3 ways a system shell command to be executed.
>
> 1.> $var = system("command");
> 2.>
On Fri, Jun 13, 2008 at 1:19 PM, Rob Dixon <[EMAIL PROTECTED]> wrote:
> Jay Savage wrote:
>>
>> You're right, the mantissa may have leading zeros. Good catch. I need
>> to keep them, though, or any later math will be off by multiple powers
>> of ten. I
On Fri, Jun 13, 2008 at 11:19 AM, Gunwant Singh <[EMAIL PROTECTED]> wrote:
> Hi there,
>
> I am still waiting for any suggestions/recommendations.
>
> Cheers.
>
please don't top-post.
Most people only read this list at most once a day, and frequently
less than that. Don't panic if you don't get a
On Thu, Jun 12, 2008 at 4:45 AM, Dr.Ruud <[EMAIL PROTECTED]> wrote:
> "Jay Savage" schreef:
>
>> two integers as input that
>> represent a single float. The first is the integer part, the second is
>> hat mantissa. How do I recomine them into a s
On Wed, Jun 11, 2008 at 2:19 PM, Rob Dixon <[EMAIL PROTECTED]> wrote:
> Jay Savage wrote:
>>
>> I'm having trouble wrapping my brain around this:
>>
>> I am writing a script that will receive two integers as input that
>> represent a single float.
I'm having trouble wrapping my brain around this:
I am writing a script that will receive two integers as input that
represent a single float. The first is the integer part, the second is
hat mantissa. How do I recomine them into a single float? all I'm
coming up with so far is:
my $float = $int_
On 5/28/08, Anchal Nigam <[EMAIL PROTECTED]> wrote:
> Does anyone use curses and the method chgat because I am unable to
> figure out how to use it. I have tried many forms of the method calls
> and they all compile but none of them do anything.
>
> Thanks
> _Nacho
>
>
Hi Nacho,
You'll be more li
On Tue, May 6, 2008 at 7:27 AM, Jack Butchie <[EMAIL PROTECTED]> wrote:
> Have been googling for some time now and every command I tried fails. I
> want to use sed from the command line or use it in a windows batch file to
> split on a pipe delimited file, windows server. The examples have \n as
And as this is the Perl beginners list, please don't top post.
2008/4/24 Andrew Curry <[EMAIL PROTECTED]>:
> As this is a beginners list are you going to explain...
>
>
> push my @c, [EMAIL PROTECTED] @a}];
> push @{$c[0]}, (@{shift @b})[1];
>
> $c[$_->[0]] = [ @{$_} ] while $_ = shift
On Tue, Apr 22, 2008 at 2:28 AM, Vishal G <[EMAIL PROTECTED]> wrote:
> Hi Guys,
>
> I have a little complicated problem...
>
> I have two arrays
>
> @a = ( ['id', 'name', 'age'],
>['1', 'Fred', '24'],
>['2', 'Frank', '42'],
> );
>
> @b = ( ['id', 'sex'],
>
On Wed, Apr 9, 2008 at 3:14 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] into the middle of @players without removing any elements
> from @players.
>
> so i've done the following...
>
> #!/usr/bin/perl -w
>
> # extracting elements using splice
>
> @players = ("ryno", "f
On Tue, Apr 8, 2008 at 6:21 PM, Jenda Krynicky <[EMAIL PROTECTED]> wrote:
> From: "Jay Savage" <[EMAIL PROTECTED]>
> > You probably meant something more like
> >
> > my $cal_r = [EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED]; #etc.
> >
On Mon, Apr 7, 2008 at 12:20 AM, Richard Lee <[EMAIL PROTECTED]> wrote:
> I just read FAQ on finding out yesterday's time.
>
> I see that one of the easy way to find out is
>
> my $date = scalar localtime( ( time() - ( 24 * 60 * 60 ) ) );
> print "$date\n";
>
> and it works fine for me
>
> I a
On Sun, Apr 6, 2008 at 5:36 AM, <[EMAIL PROTECTED]> wrote:
> Hi,
> I am doing some homework from the book Learning Perl chapter 4 excercise 1,
> Looking at the script below, I wonder why line 6 (print "Enter some numbers
> on separate line: ";) is not printed immediately after the previous prin
On Tue, Apr 1, 2008 at 5:40 PM, Chas. Owens <[EMAIL PROTECTED]> wrote:
> 2008/4/1 Jay Savage <[EMAIL PROTECTED]>:
> snip
>
> > my ($last) = $number =~ /.*(\d)/;
> >
> > Let Perl worry about what is and isn't a digit.
> snip
>
> Unf
On Tue, Apr 1, 2008 at 11:09 AM, Rob Dixon <[EMAIL PROTECTED]> wrote:
[snip]
>
> my ($lastdigit) = $number =~ /.*([0-9])/;
>
> gives you the last decimal digit (even if there are non-decimals after
> it).
>
Better yet:
my ($last) = $number =~ /.*(\d)/;
Let Perl worry about what is and
On Thu, Mar 27, 2008 at 2:22 PM, Rob Dixon <[EMAIL PROTECTED]> wrote:
>
> Yes I understood your intention, but efficiency isn't everything by any
> means. I believe very firmly that programs should be coded in the
> clearest and most obvious way possible, then tested and optimised if the
> perf
On Wed, Mar 26, 2008 at 9:47 PM, Rob Dixon <[EMAIL PROTECTED]> wrote:
> Jay Savage wrote:
> >
> > If you want to see grep really shine, though, think about ways you
> > might use it to avoid calling print for every element in the return
> > list, e.g.
&g
On Tue, Mar 25, 2008 at 9:22 PM, Dennis G. Wicks <[EMAIL PROTECTED]> wrote:
> Greetings,
>
> I get data in CSV files from several different sites
> and I can't get the date/time formats to be consistent,
> let alone have the fields arranged in the same order.
>
Dennis,
First of all, I wouldn't
On Wed, Mar 26, 2008 at 9:10 AM, Telemachus <[EMAIL PROTECTED]> wrote:
> On Mar 26, 8:24 am, [EMAIL PROTECTED] (John W. Krahn) wrote:
>
>
> > Telemachus wrote:
> > > So in a context like this, would the following be better?
> >
> > > for my $num (@testAr) {
> > > if (($num % 2) == 0 ) {
>
On Tue, Mar 25, 2008 at 11:00 PM, Telemachus <[EMAIL PROTECTED]> wrote:
> This came up somewhere else, people disagreed and now I can't see it
> clearly anymore. Imagine you have an array filled with numbers, and
> you only want to print out the even ones. Fine, someone says, use
> grep.
>
> pr
On Mon, Mar 17, 2008 at 9:55 AM, Ken Foskey <[EMAIL PROTECTED]> wrote:
>
> I am extracting addresses from an XML file to process through other
> programs using pipe delimiter the following code works but this is going
> to get 130,000 records through it it must be very efficient and I cannot
>
[please don't top post]
On Thu, Mar 6, 2008 at 10:50 AM, yitzle <[EMAIL PROTECTED]> wrote:
> I don't know much about how Perl deals with this stuff, but what
> you've done is made a copy of the pointer/reference.
> Both variables are referencing the same memory/hash.
> What you want to do is co
On Mon, Mar 3, 2008 at 5:32 PM, David Newman <[EMAIL PROTECTED]> wrote:
> Greetings. I'm looking to compare two contact lists in csv format, and
> then print out "here are the records in in Llist only, in Rlist only,
> and what's in common."
>
> I should compare only 3 of the 82 fields in each l
On Wed, Feb 27, 2008 at 9:27 PM, Nobody Imparticular
<[EMAIL PROTECTED]> wrote:
> Hi any and all;
>
> I am having a heck of time getting my head around a
> little problem I have run into; I got this question
> during an interview recently and, well, failed
> miserably. Now I am crazy to figure
On Fri, Feb 15, 2008 at 4:04 PM, <[EMAIL PROTECTED]> wrote:
> I've been trying to use regular expressions or some kind of counter
> thing, but I can't seem to work this right. I have data in a text file
> where the important thing I want to extract is between two blank
> lines. That's the only
On Feb 13, 2008 12:52 AM, Brent Clark <[EMAIL PROTECTED]> wrote:
> Chas. Owens wrote:
>
> > The XMLin method takes a string, file, or file handle as its argument.
> > Just pass $upload_filehandle to it:
> >
> > my $ref = $xs->XMLin($cgi->upload("filename"));
> > print $xs->XMLout($ref);
>
> Hi
>
>
On Feb 7, 2008 1:43 PM, <[EMAIL PROTECTED]> wrote:
> On Feb 5, 9:26 pm, [EMAIL PROTECTED] (Rob Dixon) wrote:
> >
> > Can you see now why you're getting a syntax error?
> >
> > But your concept is far too convoluted. You have a Perl process that's
> > shelling out to another Perl process, that in t
On Feb 5, 2008 10:22 AM, <[EMAIL PROTECTED]> wrote:
> I am using perl alarm within a script and having an issue. I want to
> access a host by first trying rsh and if that fails use ssh. I can
> get the command to run with only one of the commands but when I add
> both it fails. I must be missin
On Jan 25, 2008 12:20 PM, <[EMAIL PROTECTED]> wrote:
> "Jay Savage" <[EMAIL PROTECTED]> writes:
>
> > Finally, Tom's points are important. How do you *know* that the files
> > (in this case a single directory) changed *during the sleep*? Do you
>
On Jan 24, 2008 3:34 PM, <[EMAIL PROTECTED]> wrote:
> What I really want to do is monitor a directory recursively but here
> just trying to use it any basic way to start to `get' how to use it.
>
For starter, you haven't turned on the recurse flag. Take another look
at the arguments to File::Mon
On Dec 22, 2007 3:38 AM, Dermot <[EMAIL PROTECTED]> wrote:
>
>
>
> On 22/12/2007, Jay Savage <[EMAIL PROTECTED]> wrote:
> >
> > On Dec 20, 2007 3:54 AM, Dr.Ruud <[EMAIL PROTECTED]> wrote:
> > > Rob Dixon schreef:
> > > > Dr.Ruud w
On Dec 20, 2007 3:54 AM, Dr.Ruud <[EMAIL PROTECTED]> wrote:
> Rob Dixon schreef:
> > Dr.Ruud wrote:
> >> Jay Savage schreef:
> >>> Corin Lawson wrote:
>
> >>>> Can you not simply count the number of quotes mod 2?
> >>>
>
Please don't top post...
On Dec 18, 2007 6:41 PM, Corin Lawson <[EMAIL PROTECTED]> wrote:
> Hi ab,
>
> Can you not simply count the number of quotes mod 2?
>
No, you can't just count the number of quotes. An even number of
quotes doesn't mean they're all double quotes. Consider something like
q|a
On Dec 18, 2007 1:28 PM, Ryan <[EMAIL PROTECTED]> wrote:
> Here's something I've never done before and I need some help.
>
> I want to control a terminal program that is proprietary and Curses
> and such won't work. So instead I'd like to have my perl program
> output chars to the keyboard or mous
On Dec 16, 2007 2:21 PM, namotco <[EMAIL PROTECTED]> wrote:
> Let's say I want to search some text for "abc123". However, we know
> people can make typos and so they could have entered avc123 or abc223
> or sbc123 or bc123 many other combinations...
> So I want to search for those possibilities as
On Dec 14, 2007 9:00 AM, <[EMAIL PROTECTED]> wrote:
> Thanks Jeff.
>
> How will this be considered.
>
> if(system(CondA) && system(CondB)) ...
>
> I am getting 0 as the $? RC...but goes to the else part of the if-statement.
> Both the conditions (Unix commands are executed). Is it taking the Cond
llow them to read gmail at work.
While I certainly share your annoyance, I don't think we should punish
people for their employers' sins.
-- Jay Savage
--
This email and attachment(s): [ ] blogable; [ x ] ask first; [ ]
private and confidentia
On 10/31/07, Tom Phoenix <[EMAIL PROTECTED]> wrote:
[snip]
> The docs could always be more clear. The right operand of an
> or-operator does inherit the context of the operator itself. But the
> left operand's context is always Boolean.
>
Thanks for clearing that up!
> > Given that, I would expec
On 10/31/07, Tom Phoenix <[EMAIL PROTECTED]> wrote:
> On 10/31/07, Jay Savage <[EMAIL PROTECTED]> wrote:
>
> > Take another look at the Net::SFTP docs, particularly the note about
> > what get() does when called in a void context.
>
> I see a note about a n
On 10/31/07, kilaru rajeev <[EMAIL PROTECTED]> wrote:
> Hi All,
>
> I have the following code as part of my program;
>
> print "---=> $file, $localFile\n";
> $sftp -> get( $file, $localFile ) || warn("er0r
> _---> $!".$sftp->status."\n");^M
>
> Even though it has do
1 - 100 of 459 matches
Mail list logo