Hi Hoffman,
When you are trying to do a numeric comparsion on strings.
The interpreter will try to convert them to numbers and then do a
comparsion.
if it cannot convert to numbers they are made 0's and then it will compare.
for more info please refer to this url:
http://www.perlmeme.org/ho
Hoffmann schreef:
> Could some one explain how, in the example below, $name and $goodguy
> are equal numerically?
>
> $name = 'Mar';
>
> $goodguy = 'Tony';
>
> if ($name == $goodguy) {
> print "Hello, Sir.\n";
> } else {
> print "Begone, evil peon!\n";
> }
Try also with some
Dr.Ruud wrote:
Hoffmann schreef:
Could some one explain how, in the example below, $name and $goodguy
are equal numerically?
$name = 'Mar';
$goodguy = 'Tony';
if ($name == $goodguy) {
print "Hello, Sir.\n";
} else {
print "Begone, evil peon!\n";
}
Try also with s
Boga Srinivas wrote:
Hi Hoffman,
When you are trying to do a numeric comparsion on strings.
The interpreter will try to convert them to numbers and then do a
comparsion.
if it cannot convert to numbers they are made 0's and then it will
compare.
for more info please refer to this url:
ht
it's: 0 == 0
Hoffmann schrieb:
> Dr.Ruud wrote:
>> Hoffmann schreef:
>>
>>> Could some one explain how, in the example below, $name and $goodguy
>>> are equal numerically?
>>>
>>> $name = 'Mar';
>>>
>>> $goodguy = 'Tony';
>>>
>>> if ($name == $goodguy) {
>>> print "Hello, Sir.\n";
>>
Hi Guys
How could I exec a 'dir' command on a dos system and put the output in
an array, sort by date and the files that are older than 3 days be moved
into a folder called 'history'
Thanks
Craig
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
htt
Don't know much about dos.
But under unix you may got the files older than 3 days by this way,
chdir '/the/path';
@files = grep { time - (stat)[9] > 24*60*60*3 } glob "*";
2007/4/10, Craig Schneider <[EMAIL PROTECTED]>:
Hi Guys
How could I exec a 'dir' command on a dos system and put the out
On Tue, 2007-04-10 at 13:19 +0200, Craig Schneider wrote:
> Hi Guys
>
> How could I exec a 'dir' command on a dos system and put the output in
> an array, sort by date and the files that are older than 3 days be moved
> into a folder called 'history'
Look at module File::Find this should be abl
Hi,
I can't understand why the following regexp matches. It was part of a
larger program transformig c++ files:
When running:
#!/usr/bin/perl
"dummy dummy { ;" =~
m{(
^(
[^;{}]
(?> #<--- disable backtracking
(\s|\\\n)* # treat escaped \n as space
(// ([^
Hi,
If you wish to select all files that are directly under given directory you can
implement the following (in pure perl fashion):
sub numerically { $b <=> $a;}
$DIR = ;
$THRESHOLD_IN_DAYS = 3;
my %time_to_file;
my $currTime = time();
#Store all file in hash with time as key.
for each my $
On 4/10/07, Jan Chorowski <[EMAIL PROTECTED]> wrote:
I can't understand why the following regexp matches.
It doesn't match for me. Are you sure that you posted the correct
code? I'm using perl version 5.8.6.
--Tom Phoenix
Stonehenge Perl Training
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
Craig Schneider wrote:
> Hi Guys
Hello,
> How could I exec a 'dir' command on a dos system and put the output in
> an array, sort by date and the files that are older than 3 days be moved
> into a folder called 'history'
# open the current directory
opendir my $dh, '.' or die "Cannot open '.' $
Hi,
On Apr 10, 2007, at 3:27 PM, John W. Krahn wrote:
Craig Schneider wrote:
Hi Guys
Hello,
How could I exec a 'dir' command on a dos system and put the
output in
an array, sort by date and the files that are older than 3 days be
moved
into a folder called 'history'
# open the curre
Igor Sutton Lopes wrote:
>
> On Apr 10, 2007, at 3:27 PM, John W. Krahn wrote:
>
>> Craig Schneider wrote:
>>
>>> How could I exec a 'dir' command on a dos system and put the output in
>>> an array, sort by date and the files that are older than 3 days be
>>> moved into a folder called 'history
Sorry! I was testing and sent the last version -TextMate integrated
with Mail.app- :-(
On Apr 10, 2007, at 4:40 PM, John W. Krahn wrote:
[...]
Did you test this? Where do you distinguish between files "older
than 3 days"
and other files? Where is "name('trunk')" specified by the OP?
Th
Igor Sutton Lopes wrote:
> Sorry! I was testing and sent the last version -TextMate integrated
> with Mail.app- :-(
>
> On Apr 10, 2007, at 4:40 PM, John W. Krahn wrote:
>
>> [...]
>> Did you test this? Where do you distinguish between files "older
>> than 3 days"
>> and other files? Where is
On 4/10/07, John W. Krahn <[EMAIL PROTECTED]> wrote:
Igor Sutton Lopes wrote:
snip
> return unless -M $_ < 3;
Why not just use the modified( '>3' ) rule?
snip
There doesn't seem to be a performance issue either way:
Raterule explict
rule450/s -- -0%
explict 450/s
John W. Krahn wrote:
> Igor Sutton Lopes wrote:
>>
>>sub move_file {
>>
>># using -M is better than doing the calculation to obtain the
>>difference
>># from now and three days ago.
>>return unless -M $_ < 3;
>
> Why not just use the modified( '>3' ) rule?
Ok, modified( '>3' ) won't
Hi to all
Here is my problem . I'm trying to export this data to SQL database .
Here is example data.Don't pay attention on encoding. Every new record
is starting --=NewRecord=--
delimiter between fields and data is = .
Contact=АГППМП-СЪНИМЕД-ООД
Manager=
Region=РЗОК Бургас
Municipality= НЕСЕБЪР
Se
On 4/10/07, Stanislav Nedelchev <[EMAIL PROTECTED]> wrote:
Hi to all
Here is my problem . I'm trying to export this data to SQL database .
Here is example data.Don't pay attention on encoding. Every new record
is starting --=NewRecord=--
delimiter between fields and data is = .
Contact=АГППМП-СЪН
Stanislav Nedelchev wrote:
> Hi to all
Hello,
> Here is my problem . I'm trying to export this data to SQL database .
> Here is example data.Don't pay attention on encoding. Every new record
> is starting --=NewRecord=--
> delimiter between fields and data is = .
> Contact=�ГППМП-СЪ�ИМ
Chas Owens wrote:
> On 4/10/07, Stanislav Nedelchev <[EMAIL PROTECTED]> wrote:
>> Hi to all
>> Here is my problem . I'm trying to export this data to SQL database .
>> Here is example data.Don't pay attention on encoding. Every new record
>> is starting --=NewRecord=--
>> delimiter between fields a
Hi,
Can somebody explain the difference between this 2 system calls ?
system "grep 'fred flint' buff"
system "grep", "fred flint", "buff"
Thanks
Alok
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
On 4/10/07, Nath, Alok (STSD) <[EMAIL PROTECTED]> wrote:
Can somebody explain the difference between this 2 system calls ?
system "grep 'fred flint' buff"
This one asks the shell (/bin/sh) to run the command "grep 'fred flint' buff".
system "grep", "fred flint", "buff"
This one asks
Hi members,
How to judge whether I've output the http header or not where in cgi
scripts?Thank you.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
On 4/10/07, Jen mlists <[EMAIL PROTECTED]> wrote:
How to judge whether I've output the http header or not where in cgi
scripts?Thank you.
I think you're asking how a programmer can know whether or not the
header has already been output when it's time to produce output (in an
error-handling sub
26 matches
Mail list logo