Rick wrote:
> I have a perl script on remote server.
> I want to launch a expect script(none perl) from local server with
> arguments and launch perl script on remote server.(arguments will be
> feed into perl script)
> I don't know how long perl script will run but I want to scp(using
> expect
On Tue Mar 03 2009 @ 4:03, Telemachus wrote:
> > > > find( sub { -f and ( $size += -s _ ) }, $dir );
>
> That line tests if each item in $dir is a *file* (-f).
Sorry: hit send too quickly. What I meant to say there is that the
subroutine tests for files - starting from whatever directory you sp
On Tue Mar 03 2009 @ 10:21, Lauri Nikkinen wrote:
> Ok, thanks. Now I notice that I did not understand correctly what this
> script does. I was trying to print sizes of all directories in the directory
> tree. But anyway, I appreciate your kind help!
The line find( sub { #code here}, $dir ) simply
for CGI i don't believe there is anything like you are requesting - that
would be addressed in javascript. however, you can name the params in each
form as "formA_parameter", "parameter_formA", or something similar
and search like:
if (param("formA_parameter"))
{
...
}
though if you're sea
Ok, thanks. Now I notice that I did not understand correctly what this
script does. I was trying to print sizes of all directories in the directory
tree. But anyway, I appreciate your kind help!
-L
2009/3/3 Chas. Owens
> On Tue, Mar 3, 2009 at 14:59, Lauri Nikkinen
> wrote:
> snip
> > On mac's
On Tue, Mar 3, 2009 at 14:59, Lauri Nikkinen wrote:
snip
> On mac's side I followed Chas's orders, but I can't get any output
snip
> #!/usr/bin/perl
>
> use warnings;
> use strict;
> use File::Find;
>
> my $dir = defined $ARGV[0] ? $ARGV[0] : '.';
> my $size;
>
> find( sub { -f and ( $size += -s _
Ok, I'll have to try that modification. My intention was from the beginning
to print all directories and their sizes to the STDOUT. Thank you for your
help.
- L
2009/3/3 Wagner, David --- Senior Programmer Analyst --- CFS <
david.wag...@fedex.com>
>
> --
> *From:* la
On Tue, Mar 3, 2009 at 14:56, Karyn Stump wrote:
> I need to split a string on " or '.
>
> I have tried following lines in my script:
>
> my @fields = split(/["']/,$_);
snip
> Is it possible the missed " is a unicode char or something like that ?
snip
split /["']/ should work. It is possible tha
I have 2 forms:
form A and form B
I am validating if there are blank fields in form B, what can I do to make :
if (param()) {
}
but only focus on the parameters in form B... how can I call parameters from
only one form???
Is there anything like formA.param() ???
--
Julia Gallardo Lomeli
Thanks Chas!
On windows side this seems to work
C:\>perl -MFile::Find -le "print 'ok'"
ok
and it seems that File::Find module is installed though ppm won't locate it
(ppm query File::Find). And I don't know why.
On mac's side I followed Chas's orders, but I can't get any output
~ > perl -MFile
I need to split a string on " or '.
I have tried following lines in my script:
my @fields = split(/["']/,$_);
my @fields = split(/[\"\']/,$_);
but its not working as expected. It looks to be missing the " as a split char.
I also tried
my @fields = split(/[\034\039]/,$_);
Is it possible the
On Tue, Mar 3, 2009 at 14:47, Lauri Nikkinen wrote:
> I uninstalled ActiveState Perl via Add/Remove Programs and installed it
> (ActivePerl 5.10.0 Build 1004) again from here
>
> http://www.activestate.com/activeperl/
>
> and I got the same answer from ppm query File::Find. I don't know if it has
On Tue, Mar 3, 2009 at 14:28, Lauri Nikkinen wrote:
snip
> my $dir = $ARGV[0];
snip
> find( sub { -f and ( $size += -s _ ) }, $dir );
> ~ > perl Print_directory_sizes.pl
> invalid top directory at /System/Library/Perl/5.8.8/File/Find.pm line 592.
>
> So, something is wrong here also...
snip
What
I uninstalled ActiveState Perl via Add/Remove Programs and installed it
(ActivePerl 5.10.0 Build 1004) again from here
http://www.activestate.com/activeperl/
and I got the same answer from ppm query File::Find. I don't know if it has
something to do with the Windows 'cause I'm running Windows XP
On 3/3/09 Tue Mar 3, 2009 3:05 AM, "freefox"
scribbled:
> Hi,
>
> As join is a build in I guess it should/could be called without
> parenthesis.
> However these two lines gives me two different answers.
>
> my @strings = ('foo', 'bar');
>
> my $string1 = q{('} . join q{', '}, @strings . q{')
Lauri Nikkinen wrote:
It says that
*** no packages installed matching 'File::Find ***
I tried this also on my Mac and it goes like this
~ > perl -File::Find -le 'print "ok"'
ok
perldoc perlrun
[ snip ]
-Fpattern
specifies the pattern to split on if -a is also in effect. The
It says that
*** no packages installed matching 'File::Find ***
I tried this also on my Mac and it goes like this
~ > perl -File::Find -le 'print "ok"'
ok
~ > cat Print_directory_sizes.pl
#!/bin/perl
use warnings;
use strict;
use File::Find;
my $dir = $ARGV[0];
my $size;
find( sub { -f and (
On Tue, Mar 3, 2009 at 14:15, Lauri Nikkinen wrote:
> Ok, I typed
>
> C:\Perl>ppm query File
>
> to see that there is no File::Find module installed. It seems that
> ActiveState does not offer it via ppm, am I right?
snip
The name of the module is File::Find, not File. Try
ppm query File::Find
On Tue, Mar 3, 2009 at 14:09, Lauri Nikkinen wrote:
> Thanks, how can I check if the module File::find is installed on my system?
> I can't locate it from the ppm interface.
snip
File::Find is part of Core Perl, if it is not installed you have a bad install.
--
Chas. Owens
wonkden.net
The most
Ok, I typed
C:\Perl>ppm query File
to see that there is no File::Find module installed. It seems that
ActiveState does not offer it via ppm, am I right?
2009/3/3 Lauri Nikkinen
> Thanks, how can I check if the module File::find is installed on my system?
> I can't locate it from the ppm interf
Thanks, how can I check if the module File::find is installed on my system?
I can't locate it from the ppm interface.
-L
2009/3/3 Wagner, David --- Senior Programmer Analyst --- CFS <
david.wag...@freight.fedex.com>
> > -Original Message-
> > From: lauri.nikki...@gmail.com
> > [mailto:la
Lauri Nikkinen wrote:
> Hi,
>
> I'm trying to print directory sizes using script from
>
> http://coding.derkeiler.com/Archive/Perl/perl.beginners/2005-08/msg00693.html
>
> and when I try it from the cmd.exe
>
> C:\Perl>perl Print_directory_sizes.pl "C:/Temp"
>
> but I get an error message sayi
Hi,
I'm trying to print directory sizes using script from
http://coding.derkeiler.com/Archive/Perl/perl.beginners/2005-08/msg00693.html
and when I try it from the cmd.exe
C:\Perl>perl Print_directory_sizes.pl "C:/Temp"
but I get an error message saying
use of uninitialized value etc.
Whe
anupama.anuna...@gmail.com wrote:
> I'm trying to use the Win32::API module to call a simple test case
> DLL
> (call it "Test.dll").
>
> Test.cpp file
> extern "C" __declspec(dllexport) int test(int x)
> {
>x *= 2;
> return x;
> }
>
> Test.h file
>
> extern "C" __declspec(dllexport) int
Thomas Bätzler wrote:
> freefox asked:
>> As join is a build in I guess it should/could be called without
>> parenthesis.
>> However these two lines gives me two different answers.
>>
>> my @strings = ('foo', 'bar');
>>
>> my $string1 = q{('} . join q{', '}, @strings . q{')};
>> my $string2 = q{('
freefox asked:
> As join is a build in I guess it should/could be called without
> parenthesis.
> However these two lines gives me two different answers.
>
> my @strings = ('foo', 'bar');
>
> my $string1 = q{('} . join q{', '}, @strings . q{')};
> my $string2 = q{('} . join(q{', '}, @strings) .
Hi,
As join is a build in I guess it should/could be called without
parenthesis.
However these two lines gives me two different answers.
my @strings = ('foo', 'bar');
my $string1 = q{('} . join q{', '}, @strings . q{')};
my $string2 = q{('} . join(q{', '}, @strings) . q{')};
print "$string1\n";
Bill Harpley wrote:
I must process the output of an SQL query using Perl.
I know the column position of the data in the output file, which means
that I am able to calculate the width of each field.
All of the data in the file is left-aligned to the field, except for one
column.
Basically, in t
I must process the output of an SQL query using Perl.
I know the column position of the data in the output file, which means
that I am able to calculate the width of each field.
All of the data in the file is left-aligned to the field, except for one
column.
Basically, in the output of the SQ qu
I'm trying to use the Win32::API module to call a simple test case
DLL
(call it "Test.dll").
Test.cpp file
extern "C" __declspec(dllexport) int test(int x)
{
x *= 2;
return x;
}
Test.h file
extern "C" __declspec(dllexport) int test(int);
#note compling the above Cpp code using VC++ compli
30 matches
Mail list logo