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
from POSIX.pm:
perl -MPOSIX -wle 'print POSIX::fmod(35, 17.5)'
It's considerably slower than %, but it gets the job done.
HTH,
-- jay
--
This email and attachment(s): [ ] blogable; [ x ] ask first; [ ]
private a
error should tell you how much data you need to preload.
Another tactic I've used for similar projects on Linux is to read bits
from a raw audio device. That may or may not be an option on your
platform. It's not truly random--it's predictable if you know the
input--but i
the enclosing directory in
$ENV{PATH}? Etc. (assuming you're on some flavor of Unix, of course).
If the Perl passes the unit tests and the files pass the file tests,
then move on to interactive testing if you want to.
HTH,
-- jay
--
This
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.
>
> %
t regardless of where you typed 'use Env::Sourced', the
module is being imported long before you declare $oraenv. In fact, you
should see errors about "BEGIN Failed" and "" not being exported.
You should really be using require, h
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
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
ther perl programs or otherwise) can't fork
children on other machines or deliver SIGTERM across the network, and
asking about threads and remote machines in the same breath is likely
to yield strange responses and/or confused silence.
HTH,
-- jay
--
r system. It sets the shell
variables ORACLE_HOME and LD_LIBRARY PATH, and then calls /bin/perl to
re-evaluate the file. When the perl interpreter reads the file, it
ignores the shell statements. See perlrun for the gory details.
A less complex method would be to just
e the
non-digit is something else, return the 0 + the non-digit, interpreted
as base 10.
That won't be as robust as constructing your own parser as suggested
above, but as long as your input is composed of numbers and operators
as you expect, it should be a start.
HTH,
-- jay
--
--
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
see if there was a
fatal error, which you can ignore if you want to or do something along
the lines of:
eval {
my $sth = $dbh->prepare("SELECT COUNT(*) FROM mytable");
};
if ($@) {
print "Table $table -- (probably) DOES NOT EXIST\n
Hello,
I am reggie kogulan.
Please remove all references in beginners.perl.org.
Back in 2003, I was subscribing to this list and I stopped it.
I did post many messages. I want them to be removed. Because,
I did not have idea, you will be posting everything on the internet.
Google is able to
val + $offset{'2'}) ) {
do_something() && ++$group{'2'};
}
while ( time() < ($start + $interval + $offset{'3'}) ) {
do_something() && ++$group{'3'};
}
while ( time() < ($start + $interval + $offset{'4'
happen in the
allotted time.
What you seem to be doing is setting up two independent execution
paths: none of your psuedocode indicates that the alarm breaks into
the main routine or that the execution paths rejoin. If that is really
the case, what you probably really need to do is just
m died, not something else }
Either way, you should be able to use the built-in functions to
accomplish your task. See the docs for sleep(), alarm(), and select()
for more info.
HTH,
-- jay
--
This email and attachment(s): [ ] blogable; [ x
ent::IRC. The thing to do is to take a module you like and
see how it implements the interface.
Of course, the *best* thing is usually to just use the module, but
sometimes there are good reasons not to. Just make sure to give credit
where credit is due and respect the license of whatever source of
insp
rogram. From there it's just a matter of
filtering out the things you don't want.
HTH,
-- jay
--
This email and attachment(s): [ ] blogable; [ x ] ask first; [ ]
private and confidential
daggerquill [at] gmail [dot] com
http://www
as either a start-up, or as a complete
solution, consider breaking out the branches of the tree for
simultaneous processing (multi-threading, forking).
If you don't multi-thread, consider dynamically reordering the
branches based on predictive data.
HTH,
-- jay
---
lute path from that.
>
> My orignal idea was to locate ..\ with regex using m/([.]{2}\\)/ This
> would indicate if the path is relative or not
>
> use cd to obtain the present working directory. Is there a better way
> to do this???
>
Take a look at t
d use a heap to sort:
>
Parts of the date, however, are sortable. Use that to your advantage.
for my $item (sort { $a->[3] <=> $b->[3] || $a->[1] <=> $b->[1] ||
$a->[2] <=> $b->[2] || $a->[4] cmp $b->[4] }
ng a problem perhaps you've
found a new bug, or an old one that still lingers. If so, you may want
to report it. At the very least it should be documented in perlport or
perlwin32 if the problem exists in the current release and is not
local to your system.
n's cc). Your best bet
is to just work your way through the issues in the README.solaris file
until you find the source of your problems.
README.solaris is in the directory where you unzipped the Perl
tarball. You can also find it at
http://search.cpan.org/~rgarcia/perl-5.10.0/README.solaris
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
perator:
varialble = condition ? true_value : false_value;
For instance:
my $var = $x > 1 ? 'BIG X! : 'little x';
HTH,
-- jay
--
This email and attachment(s): [ ] blogable; [ x ] ask first; [ ]
private an
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
7;re really talking about page load time. That is, how
long it takes a page to show up in an end user's browser. Page load
times are only loosely related to actual download speeds. Once you
start talking about javascript, flash, etc.--even images in some
cases--the time it takes to execute and displ
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
he idea of using DBIx::Class::CDBI::Compat in the new
environement as a drop-in replacement for CDBI, but I'm not sure what
the real gains would be.
Thanks,
-- jay
--
This email and attachment(s): [ ] blogable; [ x ] ask first; [ ]
private a
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
where performing memory
deallocation in real time concureently with variable de-initialization
is important for some reason, though, googling "perl internals" will
turn up some useful results that you can use as a jumping off point
for posting some specific questions on alt.lang.perl.mis
s the standard way of doing what you seem to
want, unless you're actually performing GUI testing.
HTH,
-- jay
--
This email and attachment(s): [ ] blogable; [ x ] ask first; [ ]
private and confidential
daggerquill [at] gmail [dot] com
http:/
or the shell:
my $file = q/081201\ diskSpace.txt/;
Better yet, use an underscore instead of a space in the filename. Both
you and the shell will be happier.
HTH,
-- jay
--
This email and attachment(s): [ ] blogable; [ x ] ask first; [ ]
pr
want is a running total with subtraction.
Perl doesn't have any internal sens of "rows" and "columns," but it
does have a number of operators and function to iterate over lists and
arrays.
Assuming the the result you want is really "2,4,5"
ve installed the Algorithm::Permute module
for the default Perl 5.8.5 installation on your machine, but your
problematic scripts are invoking an Active State Perl 5.6 that you
have installed in a non-standard location. If you're going to use
multiple versions of Perl on the same machine
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
out
99% of the time.
This is particularly true when automating system admin tasks. Once you
launch an external program, any optimizations to your Perl code will
be insignificant--statistically and otherwise--compared to the runtime
of the external system call.
HTH,
-- jay
--
file:
open my $outfile, '>>', $output;
print $outfile $modified_text;
close $outfile;
HTH,
-- jay
--
This email and attachment(s): [ ] blogable; [ x ] ask first; [ ]
private and confidential
daggerquill [at] gmail [dot] com
http://www.tuaw.com http://www.downloadsquad.com http://www.engatiki.org
values of β will give rise to dom!
ny of the following data
> between ">" and "<"
Hi Brian,
There is no need to reinvent the wheel, here. Parsing HTML is
notoriously difficult, and other people have spent years on the
problem.
Take a look at HTML::Tree or HTML::TokeParser, for starters.
HTH,
-
inherent concept of objects or methods. Objects are just
subroutines that call bless() on themselves. The rules for passing
arguments to all subroutines apply to objects. The perlobj perldoc
also information on the "indirect object syntax" and how it applies,
in often quirky ways, specific
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',
>>
e
to construct a single substituion statement that does what you want,
but it is far simpler, and almost certainly more efficient, to use
two, e.g.
($string !~ m{://}) && ($string =~ s/regex/sub/});
HTH,
-- jay
--
This email and attachmen
not what hashes are for. That's what
ordered lists (arrays) are for:
my (@srca, @quad, @port );
while () {
next unless
/Sig:\s*(\d+)\s+Subsig:\s*(\d+)\s+Sev:\s*(\d+)([^\[]+)\[([\d\.]+):(\d+)\s*->\s*([\d\.]+):(\d+)\]/;
push @srca, $5;
push @quad, sprintf '
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
-
o extract the idle column. But using my code I am getting output
> like this
>
>
> pts/4
> pts/5
>
> Where I am making the mistake please rectify.
>
As Stephen pointed out, is that the w command returns output with
multiple spaces between columns, and you are splitti
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,
>>>
&
ead the device directly
with IO::Socket, etc. Of course a CD can be read like any other file
system, and there are modules to handle that scenario, too.
A CPAN search for "auido" is probably the best place to start.
HTH,
-- jay
--
This
ttp://search.cpan.org/~rgarcia/perl-5.10.0/lib/FindBin.pm#KNOWN_ISSUES
>
> Ever tried to use FindBin in a program that is run under mod_perl?
>
I believe that FindBin->again() allows it to work under mod_perl, now.
HTH,
--jay
--
This e
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.
my $float = $int_part . '.' . $matissa; #or
my $float = sprintf "%u.%u", $int_part, $mantissa;
It seems, though, like there should be a more elegant way to handle
this than turning two numbers into a string to turn around and use the
result as number again. Wh
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
^\s*$/'
# or
perl -lpane 's/|/\n/'
On Windows you may need to change the quotes around.
HTH
-- jay
--
This email and attachment(s): [ ] blogable; [ x ] ask first; [ ]
private and confidential
daggerquill [at] gmail [dot] com
http://www.
ement of the reference both store the id.
Once you understand that,
push @{$c[$_->[0]]}, $_->[1] while $_ = shift @b;
should be clearer, too.
HTH,
-- jay
--
This email and attachment(s): [ ] blogable; [ x ] ask first; [ ]
private and confidential
daggerquill [at] gmail [dot] com
http://www.tuaw.com http://www.downloadsquad.com http://www.engatiki.org
values of β will give rise to dom!
as soon as you get a value that is one list
and not the other, everything gets out of sync.
I'd probably do something like the following, which stores the is in
the array index, as well as the first element:
push my @c, [EMAIL PROTECTED] @a}];
push @{$c[0]}, (@{shift @b})[1];
e the first
> line prints all the players including the ones stated in @dump. should
> i be using negative offset or length?
>
Your first print is after the splice:
@players = ("ryno", "fukudome", "grace", "banks", "santo",
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.
> >
You probably meant something more like
my $cal_r = [EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED]; #etc.
But see the perlref and perlreftut for more info.
Once you get the references sorted out, the logic should be come
clearer, but your instinct to rewrite using hashes is probably a good
o
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
worry about what is and isn't a digit.
Best,
-- jay
--
This email and attachment(s): [ ] blogable; [ x ] ask first; [ ]
private and confidential
daggerquill [at] gmail [dot] com
http://www.tuaw.com http://www.downloadsquad.com http://www.e
; leans in that direction.
>
Point well taken. But this is a thread about grep; and grep's raison
d'etre is optimizing out loops. I don't think giving an example that
shows grep cutting a loop is out of order. I certainly hope it wasn't
unintelligible.
It's also the l
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
dn't be wrong, either. What works best for you will depend on
how big the list is, how your system is configured, and, most
importantly, what is more comfortable for you and easier on whoever
will be maintaining your program.
This is a clear case of the the Perl motto: There Is More Than On
sult list; don't waste those resources if you don't
need the results.
If all you want to do is iterate through a list and do something with
each of the elements, there are other, more efficient, ways to do
that. The examples above could be better solved by while loops, or
map, depending
ember {
my $t = shift;
print join "|",
map { s/\|//g }
map { $_[0]->descendants( $_ )->text() } qw/ member add1 add2 add3
suburb state pcode /;
}
That may not work out of the box depending on how deeply nested
XML::Twig's refs are, but hopefully
ferenced, and the bug will be very difficult to track down.
Consider something like:
my $ref = {
key => 0101010,
categories => [qw/ 001 002 007 /],
handle => {fname => 'James', lname => 'Bond'}
};
Take a look at the Stoable module, in
u, instead of relying on split. CSV
can get pretty nasty, especially for name and address data (think Doe,
Jr., John), and those modules are out there.
HTH,
-- jay
--
This email and attachment(s): [ ] blogable; [ x ] ask first; [ ]
private a
following should work:
my $tree = {};
while () {
chomp;
my @line = split;
my $this = $tree;
foreach (@line) {
$this->{$_} = {} unless exists $this->{$_};
$this = $this->{$_};
}
}
Printing the structure out is up to you, but Data::Dumper would b
n";
while (<>) {
chomp;
next if /\n/; # or change to suit
# else we have a "good" data
}
}
HTH,
-- jay
--
This email and attachment(s): [ ] blogable; [ x ] ask first; [ ]
private and confidential
dag
e that
something like the following would do:
my $xml;
$cgi = CGI->new(\&upload_hook, \$xml , 0);
sub upload_hook
{
my ($filename, $buffer, $bytes_read, $xml) = @_;
$$xml .= $buffer;
}
my $ref = $xs->XMLin($xml);
HTH,
-- jay
--
ether it
will execute rsh and pass '|| scp...' as an argument to rsh that will
cause a syntax error. Parentheses would be your friends, here.
More importantly, though: there is no reason not handle all the logic
in Perl. I suggested one way to accomplish that in my previous post.
HT
${rdist} the same way you're getting at ${host}--that
is, though the %ENV hash. Also, make sure you're paying attention to
the differences between exec() and system(). testing for the success
of exec is redundant. By the time the test would run, perl has already
exited.
A better question,
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
>
sure the module is working would, instead of
sleeping between scans and trying to modify the watched files from an
external process during a narrow window, would probably be to perform
your initial scan; open one of the watched files for writing; write to
it; flush the buffer; close it; and then rescan.
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?
> >>>
>
uble quotes. Consider something like
q|a'b'c''d'e'f|.
sometimes, it's just easier to chain together a couple of expressions:
unless ( /'/ and ( /'''/ or /[^']'[^']/ ) ) {do something}
HTH,
-- jay
-
an *control* the program using a Perl
interface module like Expect, IPC::Open3, or IPC::Run. On Windows, you
might also want to check out Win32::GuiTest.
HTH,
-- jay
--
This email and attachment(s): [ ] blogable; [ x ] ask first; [ ]
private and c
nd see if there isn't
something that meets your needs. String::Approx and
String::KeyboardDistance might be places to start. There are also a
number of things in the Text::* tree.
HTH,
-- jay
--
This email and attachment(s): [ ] blogable;
ould be to simply switch the conditional code, so
that what is currently in the else block is in the if block, and vice
versa.
HTH,
-- jay
--
This email and attachment(s): [ ] blogable; [ x ] ask first; [ ]
private and confidential
daggerqui
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
1 - 100 of 511 matches
Mail list logo