Hi ,
is it possible to access file attributes in a Win32 environment via Perl.
I am interested not only in getting the DOS attributes like creation and
modified date, but also the stuff that can be
found on the second tab folder of the "Properties" dialog: File Version,
Description, Product Ver
on Tue, 18 Feb 2003 08:42:11 GMT, [EMAIL PROTECTED] (Zeno Jauch)
wrote:
> is it possible to access file attributes in a Win32 environment
> via Perl. I am interested not only in getting the DOS attributes
> like creation and modified date, but also the stuff that can be
> found on the second tab
"Rgíón «hávkú" <[EMAIL PROTECTED]> wrote in message
003001c2d474$f6f76b20$[EMAIL PROTECTED]">news:003001c2d474$f6f76b20$[EMAIL PROTECTED]...
> Hello all.
>
> I've reading some messges relating to the use of modules.
>
> How can I know what modules are installed in the server???
>
> I have my site
Hi,
can anyone explain how to detect the module?
Can't locate loadable object for module HTML::Parser in @INC (@INC contains: lib
/usr/local/lib/perl5/site_perl/5.005/i386-freebsd
/usr/local/lib/perl5/site_perl/5.005
/usr/local/lib/perl5/site_perl/5.005/i386-freebsd
/usr/local/lib/perl5/site_perl
This is a vary slightly modified version of the example in the docs, and yet it
returns no more data than this in my log :
[Mon Feb 17 17:04:05 2003] [error] [client 66.51.160.131] Premature end of script
headers: /var/cgi-bin/parse.cgi
Any help with what might be missing would be great
Here is
> I am writing a script that will read from a file named myfiles not stdin and print
>the lines containing the following words "everywhere" or 'nowhere.
>
>
>
> #!/usr/bin/perl
> #use strict
> while (<>) {
> chomp;
> if (/^everywhere$|^nowhere$/)
> print
>
> }
>
> How do I invoked
Madhu Reddy wrote:
> Hi,
> I have following script, basically this will
> ding the duplicate rows in a file...
>
> I am getting following warnings
> Use of uninitialized value at Audit_WTN.pl line 133,
> chunk 18.
> Use of uninitialized value at Audit_WTN.pl line 133,
> chunk 19.
>
> how to avo
Rob Dixon wrote:
> Madhu Reddy wrote:
> > Hi,
> > I have following script, basically this will
> > ding the duplicate rows in a file...
> >
> > I am getting following warnings
> > Use of uninitialized value at Audit_WTN.pl line 133,
> > chunk 18.
> > Use of uninitialized value at Audit_WTN.pl li
on Tue, 18 Feb 2003 00:57:57 GMT, [EMAIL PROTECTED] (Scott
Lutz) wrote:
> This is a vary slightly modified version of the example in the
> docs, and yet it returns no more data than this in my log : [Mon
> Feb 17 17:04:05 2003] [error] [client 66.51.160.131] Premature end
> of script headers: /va
Scott Lutz wrote:
> This is a vary slightly modified version of the example in the docs,
> and yet it returns no more data than this in my log :
> [Mon Feb 17 17:04:05 2003] [error] [client 66.51.160.131] Premature
> end of script headers: /var/cgi-bin/parse.cgi
>
> Any help with what might be miss
Brady Jacksan wrote:
> I am writing a script that will read from a file named myfiles not
> stdin and print the lines containing the following words "everywhere"
> or 'nowhere.
>
>
>
> #!/usr/bin/perl
> #use strict
> while (<>) {
> chomp;
> if (/^everywhere$|^nowhere$/)
> print
>
> }
>
>
Hi
I am trying to run one perl script on APACHE server.My server is running well.I have
installed perl properly and it is configured with apache and also running well with
out any error.Now my web server is on UNIX system.I am saving my scripts in web
dirctory of server.When I tries to run the
Pankaj Kapare wrote:
> Hi
>
> I am trying to run one perl script on APACHE server.My server is running well.I have
>installed perl properly and it is configured with apache and also running well with
>out any error.Now my web server is on UNIX system.I am saving my scripts in web
>dirctory of s
--- Bryan Harris <[EMAIL PROTECTED]> wrote:
> Wild, I had no idea perl supported all these notations...
LOL!!! There are more
TMTOWTDI: There's More Than One Way To Do It.
> >> I'd like to concatenate two variables--
> >> $newVar = $old1 . $old2;
> >> -- where $old1 might be undefined. Is t
Run it from the command line on the Apache machine and see if there are
any warnings. They would go out ahead of the HTTP headers and cause a
similar result.
--- "R. Joseph Newton" <[EMAIL PROTECTED]> wrote:
> Pankaj Kapare wrote:
>
> > Hi
> >
> > I am trying to run one perl script on APACHE ser
> > if (/^everywhere$|^nowhere$/)
> > Any help is appreciated.
>
> while (<>) { print if /(every|no)where/ }
Are the anchors relevant?
while(<>) { print if /^(every|no)where$/ }
__
Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine
> do {
> my $empty;
> $empty ++;
> };
Also, the do() is superfluous here, isn't it?
It invokes some overhead (unless the optimizer squashes it out, which I
suspect)
Of course, the whole block is superfluous.
It's an expensive no-op, like saying undef(); on a line by it
> That's pretty common. A guy in our office prefers:
>
> my $doc = "\n";
> $doc .= "\tThe various lines of text his program will print\n";
> $doc .= "\tif you call it with no arguments, which he types\n";
> $doc .= "\tin quotes and indiviually appends with the dot op\n";
> $doc .= "\n";
>
> From: Madhu Reddy [mailto:[EMAIL PROTECTED]]
> sub log_msg() { print LOG "@_\n"; }
Won't work. By defining the function as
sub log_msg() {
with an explicit set of empty parens, you've promised Perl that it will
never receive any arguments, so the compiler enforces that. Perl's
prototyping c
--- Bernhard van Staveren <[EMAIL PROTECTED]> wrote:
> In general my coding style is a bit condensed, I grew up
> with Turbo Pascal and was taught to condense everything
> (whether or not that was a good call by the teacher,
> beats me) so I'm used to it.
I got my first real programming job in a
Are you certain it's installed?
--- Tom Beer <[EMAIL PROTECTED]> wrote:
> Hi,
>
> can anyone explain how to detect the module?
>
> Can't locate loadable object for module HTML::Parser in @INC (@INC
> contains: lib
> /usr/local/lib/perl5/site_perl/5.005/i386-freebsd
> /usr/local/lib/perl5/site_p
On Tue, Feb 18, 2003 at 07:33:05AM -0800, Paul wrote:
Yes it is! I can locate it via find in the subdirectory HTML under
/usr/local/lib/perl5/site_perl/5.005/i386-freebsd and permissions
should also be appropriate!
It simply won't run and I get spam overfilling my inbox. I installed
it even HTML:
Hello guys,
I have just installed PERL/Apache and mod_perl, but this last one
gave me an error when I try to compile. Could anyone help me?
Thi is the error:
bash-2.05# make && make test
cd "src/modules/perl" && make -f Makefile.modperl
make[1]: Entering directory
`/projects/IRIG/mod_pe
I think I am going to move this over to the CGI list!
:o)
Scott Lutz
Pacific Online Support
Phone: 604.638.6010
Fax: 604.638.6020
Toll Free: 1.877.503.9870
http://www.pacificonline.com
-Original Message-
From: Scott Lutz
Sent: February 17, 2003 4:58 PM
To: [EMAIL PROTECTED]
Subject: hel
Paul wrote:
> > > if (/^everywhere$|^nowhere$/)
> > > Any help is appreciated.
> >
> > while (<>) { print if /(every|no)where/ }
>
> Are the anchors relevant?
>
> while(<>) { print if /^(every|no)where$/ }
I've no idea. It's just that it seemed unlikely that the line
would contain only that
Paul wrote:
> > do {
> > my $empty;
> > $empty ++;
> > };
>
> Also, the do() is superfluous here, isn't it?
> It invokes some overhead (unless the optimizer squashes it out, which
> I suspect)
>
> Of course, the whole block is superfluous.
> It's an expensive no-op, like
Hi, all.
I was reading the perlsub docs and hit this speedbump:
NOTE: The behaviour of a "my" statement modified with a
statement modifier conditional or loop construct (e.g. "my
$x if ...") is undefined. The value of the "my" variable
may be "undef", any previously assigned
--- Rob Dixon <[EMAIL PROTECTED]> wrote:
> Paul wrote:
> > > do {
> > > my $empty;
> > > $empty ++;
> > > };
> >
> > Also, the do() is superfluous here, isn't it?
>
> I was trying to show something that would return a value in
> the same way as a subroutine block (so that
Again, from perlsub
Under
When to Still Use local()
3. You want to temporarily change just one element of an
array or hash.
You can "local"ize just one element of an aggregate.
Usually this is done on dynamics:
{
local $SIG
I don't even know where to start with this error. Can anyone point me in
the right direction?
I'm running Perl 5.6.0 on Linux RH7.2, 2.4.7-10 kernel
FirebirdSS 1.0.2.908-0 as Interbase server.
This machine has been running for 6 months, and Perl and Interbase have
been happily working together
Hello list,
What would be the safest way to create user accounts on a 2.4.x Linux system with
perl. Currently, I'm running a script that feeds options to 'useradd', but it is a
very sloppy method. The only reason i don't do this by hand is often several accounts
need to be created at once, user
On Tue, 18 Feb 2003 09:18:26 -0800 (PST), Paul <[EMAIL PROTECTED]> wrote:
> Hi, all.
> I was reading the perlsub docs and hit this speedbump:
>
>
> NOTE: The behaviour of a "my" statement modified with a
> statement modifier conditional
Personally I think using the operating system tools (useradd) is probably
the safest way to add a user minus from manually editing passwd,group files
and manually creating the directory yourself.
-Original Message-
From: Brian McGraw
To: [EMAIL PROTECTED]
Sent: 2/18/03 1:35 PM
Subject: saf
> I got my first real programming job in a shop that was all K&R C with
> tons of legacy code written by people who had taught themselves the
> language Believe me, I hacked like a machete never could, and
> statements like
>
> band = intmax(strtok(NULL,seps)[0]-64,0);
>
> were considered *qu
Ok here go's , I'm just starting to Learn Perl and it's a very slow
process.
I have this script the calculates the sum a bunch of numbers and prints
the final number to file, but my problem is I would like the number to have
a floating $sign but I'm sure how do this
Any help would be grea
> > Hi, all.
> > I was reading the perlsub docs and hit this speedbump:
> >
> > NOTE: The behaviour of a "my" statement modified with a
> > statement modifier conditional or loop construct (e.g. "my
> > $x if ...") is undefined. The value of the "my" variable
> > may be "undef
James Parsons wrote:
> Ok here go's , I'm just starting to Learn Perl and it's a very slow
> process.
>
> I have this script the calculates the sum a bunch of numbers and
> prints the final number to file, but my problem is I would like the
> number to have a floating $sign but I'm sure how
James Parsons wrote:
> Ok here go's , I'm just starting to Learn Perl and it's a very
> slow process.
Super! Lots of help available here. Suggestion #1: Use a meaningful subject
line; something like "Print floating dollar sign" would have been better
than "Simple Perl Script" ("Perl Script" is
Paul wrote:
> --- Rob Dixon <[EMAIL PROTECTED]> wrote:
> > Paul wrote:
> > > > do {
> > > > my $empty;
> > > > $empty ++;
> > > > };
> > >
> > > Also, the do() is superfluous here, isn't it?
> >
> > I was trying to show something that would return a value in
> > the same way
From: James Parsons <[EMAIL PROTECTED]>
> I have this script the calculates the sum a bunch of numbers and
> prints the final number to file, but my problem is I would like the
> number to have a floating $sign but I'm sure how do this
>
> printf ("%7.2f\n",$total);
>
>
> The number comes o
--- Bernhard van Staveren <[EMAIL PROTECTED]> wrote:
> > band = intmax(strtok(NULL,seps)[0]-64,0);
>
> I know barely enough C to hang myself with but the above does make
> sense, in a real twisted way :D
lol -- as I said, that was tame. ;0)
> I don't know really, usually the projects I write
Paul wrote:
> Hi, all.
> I was reading the perlsub docs and hit this speedbump:
>
>
> NOTE: The behaviour of a "my" statement modified with a
> statement modifier conditional or loop construct (e.g. "my
> $x if ...") is undefined. The value of the "my" variable
> may be "undef"
Paul wrote:
> Hi, all.
> I was reading the perlsub docs and hit this speedbump:
>
>
> NOTE: The behaviour of a "my" statement modified with a
> statement modifier conditional or loop construct (e.g. "my
> $x if ...") is undefined. The value of the "my" variable
> may be "und
--- James Parsons <[EMAIL PROTECTED]> wrote:
> I have this script the calculates the sum a bunch of numbers and
> prints the final number to file, but my problem is I would like the
> number to have a floating $sign but I'm sure how do this
> printf ("%7.2f\n",$total);
> The number comes out
James Parsons wrote:
> Ok here go's , I'm just starting to Learn Perl and it's a very slow
> process.
>
> I have this script the calculates the sum a bunch of numbers and
> prints the final number to file, but my problem is I would like the
> number to have a floating $ sign but I'm sure how
Paul wrote:
> @a = 'A'..'Z';
> { my @a = (0..9);
> { local $a[3] = 'foo';
> print join '|', @a, "\n";
> }
> print join '|', @a, "\n";
> }
> print join '|', @a, "\n";
>
> prints
> ==
> 0|1|2|foo|4|5|6|7|8|9|
> 0|1|2|3|4|5|6|7|8|9|
> A|B|C|D|E|F|G|H|I|J|K|L|M|N|O|P|Q|R
> > my $x = do { code };
> > works, because do flips the context, expecting a block and
> > returning a value.
>
> I hadn't actually thought of it that way, but it's remarkably well
> explained. Well done.
Thanks!
> > That way I can say
> > my $fh = do { local $_ };
> > open $fh, $file or
Paul wrote:
> > > my $x = do { code };
> > > works, because do flips the context, expecting a block and
> > > returning a value.
> >
> > I hadn't actually thought of it that way, but it's remarkably well
> > explained. Well done.
>
> Thanks!
>
> > > That way I can say
> > > my $fh = do { local
James Parsons wrote:
> Ok here go's , I'm just starting to Learn Perl and it's a very slow
> process.
>
> I have this script the calculates the sum a bunch of numbers and prints
> the final number to file, but my problem is I would like the number to have
> a floating $sign but I'm sure how
--- Rob Dixon <[EMAIL PROTECTED]> wrote:
> > NOTE: The behaviour of a "my" statement modified with a
> > statement modifier conditional or loop construct (e.g. "my
> > $x if ...") is undefined. The value of the "my" variable
> > may be "undef", any previously assigned value, o
--- david <[EMAIL PROTECTED]> wrote:
> my $x++ for(1..10);
Now there's one I hadn't thought of!
Does $x even exist after that statement? Or is it scoped to the
*implied* block?
lol -- neat. :)
Still, I wish the wording of the warning were different.
Paul
__
Paul wrote:
> Either I'm misunderstanding the code, the docs, or both, but I think
> it's the docs. What are they trying to say? Merely that
>
> my $x = 1 if 0;
>
> might not set the variable?
let me put it this way. do you know the difference of:
if(0){
my $x = 1;
}
and:
my $x =
Paul wrote:
>
> --- david <[EMAIL PROTECTED]> wrote:
>> my $x++ for(1..10);
>
> Now there's one I hadn't thought of!
> Does $x even exist after that statement? Or is it scoped to the
> *implied* block?
>
> lol -- neat. :)
>
yes it does but not with the value you expect. even if you can guess
From: Paul <[EMAIL PROTECTED]>
> --- Rob Dixon <[EMAIL PROTECTED]> wrote:
> > > NOTE: The behaviour of a "my" statement modified with a
> > > statement modifier conditional or loop construct (e.g. "my $x
> > > if ...") is undefined. The value of the "my" variable may be
> > > "
> > my $fh = do { local *_ };
>
> That doesn't do anything useful either. My guess is that Perl will
> attempt to stringify the typeglob and put something like
> qw( *package::_ ) into $x.
You sure? Somebody once told me to use
my $fh = do { local *FH };
because local saves the previous val
--- david <[EMAIL PROTECTED]> wrote:
> Paul wrote:
> > @a = 'A'..'Z';
> > { my @a = (0..9);
> > { local $a[3] = 'foo';
> > print join '|', @a, "\n";
> > }
> > print join '|', @a, "\n";
> > }
> > print join '|', @a, "\n";
> >
> > prints
> > ==
> > 0|1|2|foo|4|5|6|7|8|
--- Jenda Krynicky <[EMAIL PROTECTED]> wrote:
> Replace the whole paragraph with
>
> DO NOT DO THIS!
Now that parses. ;o]
__
Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine's Day
http://shopping.yahoo.com
--
To unsubscribe, e-m
--- david <[EMAIL PROTECTED]> wrote:
> let me put it this way. do you know the difference of:
> if(0){ my $x = 1; }
> and:
> my $x = 1 if(0);
Several. The primary *difference* I see is that in your version, the
scome of $x is limited to the block of the if statement, where in mine,
it would b
> >> my $x++ for(1..10);
> >
> > Does $x even exist after that statement? Or is it scoped to the
> > *implied* block?
>
> yes it does but not with the value you expect. even if you can
> guess what the value is, don't expect Perl won't change that in
> future version. that's all the doc trying t
Paul wrote:
>
> Lexicals aren't in the symbol table.
>
> my $foo;
>
> *can't* be accessed as $pack::foo, because it isn't IN a package.
>
true.
> Locals, on the otherhand, *have* to be package variables that can be
> tracked by $pack::foo syntax. So how can
>
> my @bar;
>
> allow
>
>
Paul wrote:
>
> --- david <[EMAIL PROTECTED]> wrote:
>> let me put it this way. do you know the difference of:
>> if(0){ my $x = 1; }
>> and:
>> my $x = 1 if(0);
>
> Several. The primary *difference* I see is that in your version, the
> scome of $x is limited to the block of the if statement
From: Paul <[EMAIL PROTECTED]>
> --- david <[EMAIL PROTECTED]> wrote:
> > Paul wrote:
> > > @a = 'A'..'Z';
> > > { my @a = (0..9);
> > > { local $a[3] = 'foo';
> > > print join '|', @a, "\n";
> > > }
> > > print join '|', @a, "\n";
> > > }
> > > print join '|', @a, "\n";
>
--- Jenda Krynicky <[EMAIL PROTECTED]> wrote:
> From: Paul <[EMAIL PROTECTED]>
> > --- david <[EMAIL PROTECTED]> wrote:
> > > Paul wrote:
> > > > @a = 'A'..'Z';
> > > > { my @a = (0..9);
> > > > { local $a[3] = 'foo';
> > > > print join '|', @a, "\n";
> > > > }
> > > > print
> > Lexicals aren't in the symbol table.
> > my $foo;
> > *can't* be accessed as $pack::foo, because it isn't IN a package.
>
> true.
>
> > Locals, on the otherhand, *have* to be package variables that can
> > be tracked by $pack::foo syntax. So how can
> > my @bar;
> > allow
> > local $bar
> > > > $domain =~ m/((\w+)\.(\w+)$)/;
> > > my($dom) = $URI =~ m{://([^/:]+)};
> > What I was trying to get was just the domain without any
> subdomains,
> > ie what you would register with a registrar
>
> Ah. Sorry, I misunderstood.
> Nothing comes to mind off the top of my head.
Oh well,
So seems the concensus. I will be trying to adapt a module type system for it.
Thanks
Dan
> Dan Muey wrote:
>
> >
> > To share configuration variables in one place for lots and lots of
> > scripts to use instead of having to put them in each script
> and then
> > on echanges and having to g
Thanks! I 'll give her a go that route.
I like the idea just need time to do it then polish it up.
Thanks
Dan
>
> > Well, any other ideas on how I can have a hundred scripts
> all use the
> > same settings and make it easy to change any of them at
> will without
> > having to go edit a hun
> So seems the concensus. I will be trying to adapt a module type
> system for it.
Feel free to post for assistance.
We learn more that way, lol ;o]
__
Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine's Day
http://shopping.yahoo.com
Paul wrote:
>> > Lexicals aren't in the symbol table.
>> > my $foo;
>> > *can't* be accessed as $pack::foo, because it isn't IN a package.
>>
>> true.
>>
>> > Locals, on the otherhand, *have* to be package variables that can
>> > be tracked by $pack::foo syntax. So how can
>> > my @bar;
>> >
Greetings!
The script I am trying to improve uses sendmail. Before I install the
script on its target Unix box, I would like to make sure the sendmail
part of it works. However, I'm working on a Win98 box. Where can I
get a sendmail for this?
Rob, who would have searched the archives if the ar
David wrote:
>
> Paul wrote:
> >
> > Not so -- ALL package variables in Perl *are* global, but likewise all
> > global variables in Perl are package vars. Even $_ is technically
> > $main::_ so that
> >
> > $_ = 'foo';
> > package bob;
> > print $main::_."\n";
> >
> > prints "foo" and the ne
I don't think sendmail is available for windows machines...
Try something like "blat":
http://www.interlog.com/~tcharron/blat.html
On Wed, 2003-02-19 at 11:12, Rob Richardson wrote:
> Greetings!
>
> The script I am trying to improve uses sendmail. Before I install the
> script on its target U
Hi,
This is regarding sending e-mail from perl script
using SMTP
my script is running fine..but i am not getting any
mail which i sent from script...
following is my program
correct me if any thing is wrong in the script.
messages with debug option attached at the end.
-
Beau E. Cox wrote:
>> Reading over Friedl's "Mastering Regular Expressions", and he gives a
>> problem on pp. 143-144 where a poorly formed expression takes
>> might-as-well-be-forever to finish.
>>
>> I can't replicate the problem.
>>
>> I'm using 5.8. Have they upgraded that problem away?
>> I
Hi Guys,
now it's working fine
there is typeo in e-mail address
i put email address as '[EMAIL PROTECTED]'
here typeo...
actual is "redy.ponnolu"
now, how to chatch this type of erros in script...
if i put wrong e-mail address...does it bounce back ?
how to check this...
--- Madhu Redd
Hi,
How to get first line, last line and no of lines in
a file.
is there any perl functions available for that ?
right now what i am doing is
open file
while (
{
$lines++;
}
close(FH)
This operation is expensive..
suppose, if file have millions of records,
it will take more time
I t
> -Original Message-
> From: Madhu Reddy [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, February 19, 2003 1:25 PM
> To: [EMAIL PROTECTED]
> Subject: How to get 1st line, last line and no of lines in a file
>
>
> Hi,
>How to get first line, last line and no of lines in
> a file.
>
Hello,
I was wondering how I would could access arrays of arrays. I would like to
be able to get to (print, for now) the value in each nested array. Here
is what I've been trying:
~~~
#!/usr/bin/perl
@jon = qw/ "jon" "hansfelt" "123-1122" /;
@ben = qw/
78 matches
Mail list logo