Re: Checking if a website is up doesn't work correctly

2018-02-17 Thread Manfred Lotz
It seems there are special checks active on that site. -- Manfred > On 2/13/2018 8:33 PM, beginners-digest-h...@perl.org wrote: > > I tried WWW::Mechanize, and (of course) got also 403. > > > > Really strange. > > > > Is there another tool I could

Re: Checking if a website is up doesn't work correctly

2018-02-13 Thread Manfred Lotz
ORIGIN > > > class="no-js" lang="en-US"> > Access denied | www.sil.org used Cloudflare to restrict > access > > > (+ 2770 more bytes not shown) > > so it's up, but "forbidden" probably as the user agent isn't s

Re: Checking if a website is up doesn't work correctly

2018-02-13 Thread Manfred Lotz
But am afraid this is not all of it. If I test http://scripts.sil.org/OFL then I get an error but it is fine in firefox. Very strange. -- Manfred > > On Tue, Feb 13, 2018 at 5:25 AM, Manfred Lotz > wrote: > > > Hi there, > > Somewhere I found an example how to ch

Checking if a website is up doesn't work correctly

2018-02-13 Thread Manfred Lotz
!! at ./check_url.pl line 8. However, firefox shows the site works ok. What am I doing wrong? -- Thanks, Manfred -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: Bizarre copy of HASH in list assignment...

2015-04-12 Thread Manfred Lotz
... I just worked around by using warn/die again. -- Manfred On Tue, 31 Mar 2015 13:24:31 +0300 Shlomi Fish wrote: > Hi Manfred, > > On Tue, 31 Mar 2015 10:28:13 +0200 > Manfred Lotz wrote: > > > Hi there, > > I have a script where I use croak and somebody else using

Bizarre copy of HASH in list assignment...

2015-03-31 Thread Manfred Lotz
7;, 'b' => q{}, ); while ( my ( $key, $val ) = each %vars ) { if ( not defined $val ) { croak "No value given for $key"; } if ( $val eq q{} ) { croak "Variable $key has empty value!"; } }

Re: catching utf8 errors

2015-03-15 Thread Manfred Lotz
On Sun, 15 Mar 2015 23:26:41 +1300 Kent Fredric wrote: > On 15 March 2015 at 21:41, Manfred Lotz wrote: > > > I agree but I thought that in this case I would need to know the > > potential warning messages the :encoding(UTF-8) could issue in > > order to take action i

Re: catching utf8 errors

2015-03-15 Thread Manfred Lotz
On Sun, 15 Mar 2015 21:11:05 +1300 Kent Fredric wrote: > On 15 March 2015 at 20:07, Manfred Lotz wrote: > > > I prefer the method Charles showed. But nevertheless your method is > > interesting as well. > > > > FWIW, SIG{__WARN__} is much preferred over redirecti

Re: catching utf8 errors

2015-03-15 Thread Manfred Lotz
I prefer the method Charles showed. But nevertheless your method is interesting as well. Thanks for sharing, Manfred On Sat, 14 Mar 2015 14:24:48 -0400 Brandon McCaig wrote: > On Sat, Mar 14, 2015 at 03:20:06AM -0700, Charles DeRykus wrote: > > open my $fh, '<:enco

Re: catching utf8 errors

2015-03-14 Thread Manfred Lotz
On Sat, 14 Mar 2015 03:20:06 -0700 Charles DeRykus wrote: > On Sat, Mar 14, 2015 at 2:38 AM, Manfred Lotz > wrote: > > Hi all, > > I wanted to test what happens if Perl encounters an error when > > reading a utf8 encoded file. > > > > Here a minimal example:

Re: catching utf8 errors

2015-03-14 Thread Manfred Lotz
On Sat, 14 Mar 2015 23:18:42 +1300 Kent Fredric wrote: > On 14 March 2015 at 22:38, Manfred Lotz wrote: > > > following error message which is fine. > > > Sorry for being pedantic, but I think you'll find that those are what > we call "warnings", not

catching utf8 errors

2015-03-14 Thread Manfred Lotz
above goes to stderr which basically is ok. Hovever, I want to take action in my script if such an error occurs. How do I notice it programmatically? -- Thanks, Manfred -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: File checks

2014-05-22 Thread Manfred Lotz
if ( -f $fname and not -l _ )' should perhaps be replaced by: if ( not -l $fname and -f _ ) which avoids above error message. -- Manfred -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: File checks

2014-05-22 Thread Manfred Lotz
On Thu, 22 May 2014 14:37:01 -0700 Charles DeRykus wrote: > On Thu, May 22, 2014 at 1:40 PM, Manfred Lotz > wrote: > > Hi there, > > I want to check if a file is a plain file but not a symlink. > > > > It seems because -f returns true for a symlink that I

File checks

2014-05-22 Thread Manfred Lotz
Hi there, I want to check if a file is a plain file but not a symlink. It seems because -f returns true for a symlink that I have to do this: my $fname = 'somefile'; if ( -f $fname and not -l $fname ) { say "$fname is a plain file"; } Is there a simpler way to do

Re: OO perl programming

2014-02-06 Thread Manfred Lotz
aling it. Moreover, he didn't say: this is my site and it is the best in the world. So his behavior was honest implicitly saying: this is my site, you may judge for yourself if you like my view of things. At least this is how I perceived it. -- Manfred > On Wed, Feb 5, 2014

Re: package block

2014-02-05 Thread Manfred Lotz
Hi Paul, On Wed, 5 Feb 2014 11:37:08 + Paul Johnson wrote: > On Wed, Feb 05, 2014 at 10:51:56AM +0100, Manfred Lotz wrote: > > Hi all, > > Perl 5.14 allows package blocks. > > > > Assume i have a file Hello.pm > > > > package Hello; { > >

Re: package block

2014-02-05 Thread Manfred Lotz
Hi Shlomi, On Wed, 5 Feb 2014 14:20:55 +0200 Shlomi Fish wrote: > Hi Manfred, > > On Wed, 5 Feb 2014 10:51:56 +0100 > Manfred Lotz wrote: > > > Hi all, > > Perl 5.14 allows package blocks. > > > > Assume i have a file Hello.pm > > > > pa

package block

2014-02-05 Thread Manfred Lotz
Hi all, Perl 5.14 allows package blocks. Assume i have a file Hello.pm package Hello; { ... 1; } # or better here # 1; My question is: Would I put 1; inside the { } or should I put it outside the { }. -- Manfred -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For

Re: How to create a socket file?

2014-01-08 Thread Manfred Lotz
On Wed, 8 Jan 2014 14:54:10 +0200 Shlomi Fish wrote: > On Wed, 8 Jan 2014 13:32:49 +0100 > Manfred Lotz wrote: > > > Hi Shlomi, > > > > Thanks a lot. This is exactly what I was after. > > > > Hi Manfred, > > you are welcome. > > One

Re: How to create a socket file?

2014-01-08 Thread Manfred Lotz
Hi Shlomi, Thanks a lot. This is exactly what I was after. -- Manfred On Wed, 8 Jan 2014 13:15:22 +0200 Shlomi Fish wrote: > Hi Manfred, > > Please reply to list if it's a mailing list post - > http://shlom.in/reply . > > On Wed, 8 Jan 2014 11:42:45 +0100 > Manf

How to create a socket file?

2014-01-08 Thread Manfred Lotz
Hi there, For test purposes I want to create a socket file. Something I could list via ls -l. That's all I want to achieve. As I didn't find any utility to create a socket file my hope is that Perl offers something to do this. Any idea? -- Manfred -- To unsubscribe, e-mail:

Re: Testing a standalone script

2013-10-29 Thread Manfred Lotz
On Tue, 29 Oct 2013 12:01:52 -0700 John SJ Anderson wrote: > On Tue, Oct 29, 2013 at 11:02 AM, Manfred Lotz > wrote: > > This is exactly what I don't want to do. IMHO, for testing modules > > or applications this is the way to go. However, for a standalone > > sc

Re: Testing a standalone script

2013-10-29 Thread Manfred Lotz
On Tue, 29 Oct 2013 12:36:58 -0400 Shawn H Corey wrote: > On Tue, 29 Oct 2013 17:10:51 +0100 > Manfred Lotz wrote: > > > Hi there, > > I have some relatively small standalone perl scripts where I would > > like to include tests. > > > > Which is the rec

Testing a standalone script

2013-10-29 Thread Manfred Lotz
Hi there, I have some relatively small standalone perl scripts where I would like to include tests. Which is the recommended way to test standalone scripts? -- Manfred -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http

Re: Can't close filehandle

2013-05-01 Thread Manfred Lotz
On Wed, 1 May 2013 14:57:34 -0700 Charles DeRykus wrote: > On Wed, May 1, 2013 at 12:57 PM, Manfred Lotz > wrote: > > > On Wed, 1 May 2013 12:00:18 -0700 > > Charles DeRykus wrote: > > > > > > ... > > > > Thanks for your detailed explan

Re: Can't close filehandle

2013-05-01 Thread Manfred Lotz
de it past ok... > Can't close(GLOB(0x64dcf8)) filehandle: '' at... > It seems that the best is to disable autodie for this particular close. -- Manfred -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: Can't close filehandle

2013-05-01 Thread Manfred Lotz
lanations. I think that close should work as I cannot see any reason why a failure of a command closes the pipe prematurely. -- Manfred -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: Can't close filehandle

2013-05-01 Thread Manfred Lotz
On Wed, 1 May 2013 10:04:15 -0500 Andy Bach wrote: > On Wed, May 1, 2013 at 9:22 AM, Manfred Lotz > wrote: > > > have a script where I log stuff to a file and the same time displays > > it to stdout using Log4perl. > > > > If you use the autodie perld

Re: Can't close filehandle

2013-05-01 Thread Manfred Lotz
On Wed, 1 May 2013 07:58:38 -0700 "Ron Bergin" wrote: > Manfred Lotz wrote: > > Hi there, > > I have a script where I log stuff to a file and the same time > > displays it to stdout using Log4perl. > > > > Here is a minima

Can't close filehandle

2013-05-01 Thread Manfred Lotz
-help' for more information. Can't close(GLOB(0x2554c80)) filehandle: '' at ./test02.pl line 20 close does not fail if the command is ok, e.g. 'uname -a'. Can anybody explain to me why close fails in the example above? -- Thanks, Manfred -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: Unicode question

2012-07-13 Thread Manfred Lotz
On Thu, 12 Jul 2012 15:40:55 -0500 Andy Bach wrote: > On Thu, Jul 12, 2012 at 3:25 PM, Manfred Lotz > wrote: > > This is really nice. I fumbled with unpack before but have to admit > > that I didn't know about 'use bytes' which is the key. > > Couple inte

Re: Unicode question

2012-07-12 Thread Manfred Lotz
On Thu, 12 Jul 2012 21:01:35 +0200 Manfred Lotz wrote: ... > > > > On the one hand I believe there must be a 'better' way. On the other > hand I like the idea (didn't occur to me) to read from the string as > if it were a file. > I found somet

Re: Unicode question

2012-07-12 Thread Manfred Lotz
Hi Shawn, Thanks for your reply. On Thu, 12 Jul 2012 14:50:16 -0400 Shawn H Corey wrote: > On 12-07-12 02:08 PM, Manfred Lotz wrote: > > The following code works fine. However, I like to know how to > > retrieve the UTF-8 hex representation of $uchar which is x'e0a487'.

Unicode question

2012-07-12 Thread Manfred Lotz
my $len = length $uchar; say "Length of $uchar is $len"; -- Manfred -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: Getopt::Long

2012-05-16 Thread Manfred Lotz
.1\n"; exit; } sub usage { print <<"END_USAGE" Usage: $0 [ Options ] This script does important work Options: -n, --dry-run Simulates rsync commands -V, --version Print version -h, --help This help END_USAGE ;

Re: Perl preprocessor

2012-05-06 Thread Manfred Lotz
On Fri, 4 May 2012 23:01:46 -0700 Jim Gibson wrote: > > On May 4, 2012, at 12:31 PM, Manfred Lotz wrote: > > > > > Thanks to both (Uri) of you for your reply. > > > > I recognize that my example was bad. If I just would like to > > substitute stuff th

Re: Perl preprocessor

2012-05-04 Thread Manfred Lotz
On Fri, 4 May 2012 20:27:36 +0200 Paul Johnson wrote: > On Fri, May 04, 2012 at 08:16:01PM +0200, Manfred Lotz wrote: > > Hi there, > > I'm looking for a Perl preprocessor which should roughly be able to > > work like this: > > > > In a document I have

Perl preprocessor

2012-05-04 Thread Manfred Lotz
code should be lexical in a way that later code could refer to previous code. Primitive example: This is a sample document. ## my $name = 'Manfred Lotz'; ## My name is ## print $name; ## and I'm from Germany. should result in the following document: This is a sample document

Re: Recommended config/ini file module?

2012-05-04 Thread Manfred Lotz
On Tue, 01 May 2012 08:38:01 -0700 Michael Rasmussen wrote: > On 2012-05-01 06:43, Manfred Lotz wrote: > > On Tue, 1 May 2012 05:57:28 -0700 > > Michael Rasmussen wrote: > > > >> On Tue, May 01, 2012 at 11:58:46AM +0200, Manfred Lotz wrote: > >> > Hi

Re: Recommended config/ini file module?

2012-05-01 Thread Manfred Lotz
On Tue, 1 May 2012 15:58:49 +0530 Mohan L wrote: > On Tue, May 1, 2012 at 3:28 PM, Manfred Lotz > wrote: > > > Hi there, > > What is a recommended Module for processing config resp. inifile > > formats? > > > > One important feature I need is to use prev

Re: Recommended config/ini file module?

2012-05-01 Thread Manfred Lotz
On Tue, 1 May 2012 05:57:28 -0700 Michael Rasmussen wrote: > On Tue, May 01, 2012 at 11:58:46AM +0200, Manfred Lotz wrote: > > Hi there, > > What is a recommended Module for processing config resp. inifile > > formats? > > > > One important feature I need is

Recommended config/ini file module?

2012-05-01 Thread Manfred Lotz
; above is nice to have but not such important. I don't care much if there is a : or = or only whitespace between entry name and value. -- Manfred -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: File::Find::Object::Rule problem

2012-04-23 Thread Manfred Lotz
On Mon, 23 Apr 2012 06:02:55 + Jack Maney wrote: > Manfred, > > The issue is that you're storing the return value of the start method > into $plf, and if you look at the source code, the start method > returns 1. > > In fact, using Data::Dumper, >

Re: File::Find::Object::Rule problem

2012-04-23 Thread Manfred Lotz
On Mon, 23 Apr 2012 11:01:33 +0300 Shlomi Fish wrote: > Hi all, > > On Mon, 23 Apr 2012 10:12:33 +0300 > Shlomi Fish wrote: > > > Hi Jack, > > > > On Mon, 23 Apr 2012 06:02:55 + > > Jack Maney wrote: > > > > > Manfred, > > &

File::Find::Object::Rule problem

2012-04-22 Thread Manfred Lotz
hile ( my $perl_file = $plf->match ){ print "$perl_file\n"; } This yields: Can't call method "match" without a package or object reference at ./test_find_object_rule.pl line 12. The example is pretty much modelled after what the man page gave. Any idea what

Re: XML::Mini question

2012-04-18 Thread Manfred Lotz
On Wed, 18 Apr 2012 22:23:37 +0200 Manfred Lotz wrote: > On Thu, 19 Apr 2012 06:15:47 +1000 > "Owen" wrote: > > > > > > Hi there, > > > I've got a question about XML::Mini. > > > > > > When parsing an xml document for some reas

Re: XML::Mini question

2012-04-18 Thread Manfred Lotz
t; > > > > Any idea, what's going wrong? > > > What Happens if you set $XML::Mini::IgnoreWhitespaces = 1 > > Seems to me that 1 = yes > This is true. > What does the documentation say? > If I set it to 1 then I get book' => 'Learning Perl' which is even worse. Please note that I don't want to have ignored white space. -- Manfred -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

XML::Mini question

2012-04-18 Thread Manfred Lotz
put: VAR1 = { 'book' => 'Learning Perl ' }; I would have expecte to have book' => ' Learning Perl ' instead. Any idea, what's going wrong? -- Manfred -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: & and subroutine

2012-04-17 Thread Manfred Lotz
On Tue, 17 Apr 2012 14:43:01 +0100 Gary Stainburn wrote: > On Tuesday 17 April 2012 13:30:59 Manfred Lotz wrote: > > > > One example is this: > > > > #! /usr/bin/perl > > > > use strict; > > use warnings; > > > > mysub; > > > >

Re: & and subroutine

2012-04-17 Thread Manfred Lotz
mysub is a subroutine. 2. mysub(); Usind () after mysub you also tell Perl that mysub is a subroutine. 3. &mysub(); Combining 1. and 2. works also but is not recommended. Hmm, at least I do no recommend it. Use 2. and you'll be happy. There are surely some other situations wher

Re: Template::Toolkit question

2012-04-09 Thread Manfred Lotz
use warnings; > > > > use Template; > > > > my $variables = { nrme => "Manfred", }; > > > > my $cmd = 'Hi [% name %], how are you.'; > > > > my $template = Template->new(); > > > > $template->process(\$cmd, $variab

Re: Template::Toolkit question

2012-04-09 Thread Manfred Lotz
On Mon, 09 Apr 2012 17:03:13 -0400 Uri Guttman wrote: > On 04/09/2012 02:28 PM, Manfred Lotz wrote: > > Hi all, > > Let's say I use Template:Toolkit like this: > > > > <-snip---> > > #! /usr/bin/perl > > >

Re: Template::Toolkit question

2012-04-09 Thread Manfred Lotz
On Mon, 9 Apr 2012 20:28:14 +0200 Manfred Lotz wrote: > Hi all, > Let's say I use Template:Toolkit like this: > > <-snip---> > #! /usr/bin/perl > > use strict; > use warnings; > > use Template; > > my $variabl

Template::Toolkit question

2012-04-09 Thread Manfred Lotz
Hi all, Let's say I use Template:Toolkit like this: <-snip---> #! /usr/bin/perl use strict; use warnings; use Template; my $variables = { nrme => "Manfred", }; my $cmd = 'Hi [% name %], how are you.'; my $template = Template

Re: Why do I get a warning?

2012-03-26 Thread Manfred Lotz
On Mon, 26 Mar 2012 20:58:43 +0200 Paul Johnson wrote: > On Mon, Mar 26, 2012 at 06:10:08PM +0200, Manfred Lotz wrote: > > On 25 Mar 2012 13:11:16 - > > Peter Scott wrote: > > > > > On Thu, 22 Mar 2012 20:06:35 -0400, Uri Guttman wrote: > > > > no

Re: Why do I get a warning?

2012-03-26 Thread Manfred Lotz
didn't agree with him until I > tried it, then found he was right. > Peter, thanks for this. As it is a goal for me as a Perl beginner to learn a good Perl coding style I will stick to this also. -- Manfred -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional

Re: Why do I get a warning?

2012-03-23 Thread Manfred Lotz
On Fri, 23 Mar 2012 02:35:28 -0400 Uri Guttman wrote: > On 03/23/2012 12:21 AM, Manfred Lotz wrote: > > On Thu, 22 Mar 2012 20:06:35 -0400 > > Uri Guttman wrote: > > > > My idea behind using always braces was that then I'm always sure > > Perl does the ri

Re: Why do I get a warning?

2012-03-22 Thread Manfred Lotz
On Thu, 22 Mar 2012 20:06:35 -0400 Uri Guttman wrote: > On 03/22/2012 05:49 PM, Manfred Lotz wrote: > > > > > In documentation about 'open' I found: > > > > Note that if you're storing FILEHANDLEs in an array, or if > > you&#x

Re: Why do I get a warning?

2012-03-22 Thread Manfred Lotz
On Thu, 22 Mar 2012 14:09:32 -0700 Leo Susanto wrote: > On Thu, Mar 22, 2012 at 1:54 PM, Manfred Lotz > wrote: > > On Thu, 22 Mar 2012 13:08:53 -0700 > > Leo Susanto wrote: > > > >> you should do > >> > >> print {$hdl} "a line

Re: Why do I get a warning?

2012-03-22 Thread Manfred Lotz
On Thu, 22 Mar 2012 13:08:53 -0700 Leo Susanto wrote: > you should do > > print {$hdl} "a line\n"; > > instead of > > print $hdl "a line\n"; > Thanks for this. Didn't know that. Why is this required? It works also without {}. -- Manfred

Re: Why do I get a warning?

2012-03-22 Thread Manfred Lotz
On Thu, 22 Mar 2012 16:11:37 -0400 Michael Putch wrote: > On 3/22/2012 3:47 PM, Manfred Lotz wrote: > > Hi all, > > If I run the following small test snippet > > > > <--snip> > > #! /usr/bin/perl > >

Re: Why do I get a warning?

2012-03-22 Thread Manfred Lotz
On Thu, 22 Mar 2012 15:06:35 -0500 Chris Stinemetz wrote: > On Thu, Mar 22, 2012 at 2:47 PM, Manfred Lotz > wrote: > > Hi all, > > If I run the following small test snippet > > > > <--snip> > > #! /usr/bin

Why do I get a warning?

2012-03-22 Thread Manfred Lotz
t;", "fileio2.txt"; print HDL "a line\n"; close HDL; <--snap> I get the message: Name "main::HDL" used only once: possible typo at ./fileio1.pl line 16. Why? The same as with $hdl above I use HDL three

Re: Problem with $_

2012-03-04 Thread Manfred Lotz
w it is surely a good idea to use 'my $somevar' in the foreach loop in most of the cases. -- Thanks much, Manfred -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: Problem with $_

2012-03-04 Thread Manfred Lotz
Hi Timothy, Thanks for your reply. On Sun, 4 Mar 2012 10:52:04 +0100 timothy adigun <2teezp...@gmail.com> wrote: > Hi Manfred, > > On Sun, Mar 4, 2012 at 8:56 AM, Manfred Lotz > wrote: > > > Hi there, > > I've got a strange problem with $_. It seems I

Re: Problem with $_

2012-03-04 Thread Manfred Lotz
Hi Rob, Thanks for your reply. On Sun, 04 Mar 2012 09:50:07 + Rob Dixon wrote: > On 04/03/2012 07:56, Manfred Lotz wrote: ... > > > > Running this gives: > > > > Sub3: Issuing [uname -a] > > Linux hogwart 3.0.0-14-generic-pae #23~lucid1-Ubuntu SMP Thu Dec

Problem with $_

2012-03-04 Thread Manfred Lotz
catenation (.) or string at ./foreach1.pl line 20. Sub1 1 Use of uninitialized value $cmd in concatenation (.) or string at ./foreach1.pl line 20. Sub1 1 What am I doing wrong here? -- Manfred -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: run command from perl

2012-03-03 Thread Manfred Lotz
On 4 Mar 2012 05:03:55 - Peter Scott wrote: > On Fri, 02 Mar 2012 21:31:50 +0100, Manfred Lotz wrote: > > Another question I have: Where do I find what '-|' means? I mean the > > minus before the pipe char. > > perldoc -f open > > Thanks, fo

Re: run command from perl

2012-03-02 Thread Manfred Lotz
snap> But I get those errors which confuse me. Use of uninitialized value $cmd in concatenation (.) or string at ./testcmd2.pl line 34, line 4. Issuing [] and more of these. What is going on here? I assume that I made a typical begin

run command from perl

2012-02-26 Thread Manfred Lotz
turn $rc; } I tested the code and it I can say it worked fine under fair weather conditions. Question: Is the code ok, or could it be improved, or has it even flaws? -- Thanks, Manfred -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: be

Re: remove_tree question

2012-02-26 Thread Manfred Lotz
Hi Rob, On Sat, 25 Feb 2012 20:43:15 + Rob Dixon wrote: > On 25/02/2012 19:24, Manfred Lotz wrote: > > Hi all, > > I had a look at remove_tree from File::Path. > > > > Let us say I have a directory: ./a/b/c/d > > > > When I do > > > > re

remove_tree question

2012-02-25 Thread Manfred Lotz
s: rmdir ./a/b/c/d rmdir ./a/b/c rmdir ./a/b rmdir ./a' ? Or is there another module which does give nicer messages when deleting a directory tree? -- Manfred -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: map usage

2012-02-20 Thread Manfred Lotz
On Mon, 20 Feb 2012 20:14:13 +0100 "Christian Walde" wrote: > On Mon, 20 Feb 2012 20:08:31 +0100, Manfred Lotz > wrote: > > > Hi there, > > > > I have a hash table where I want to do some action for each value in > > the hash table. > > >

Re: map usage

2012-02-20 Thread Manfred Lotz
On Mon, 20 Feb 2012 20:08:31 +0100 Manfred Lotz wrote: > Hi there, > > I have a hash table where I want to do some action for each value in > the hash table. > > > > Among other possibilities I could do like this: >map { some_action($_) } values %ht; >

map usage

2012-02-20 Thread Manfred Lotz
: 1. Is there another perhaps better one liner to do it? 2. Is it a problem when I don't take care about what map returns, namely a list of 1's? -- Thanks, Manfred -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@per

Re: How to evaluate a raw string?

2008-10-05 Thread Manfred Lotz
John W. Krahn wrote: Manfred Lotz wrote: Mr. Shawn H. Corey wrote: On Sun, 2008-10-05 at 16:54 +0200, Manfred Lotz wrote: my $DRYRUN="--dry-run"; my $cmd = q(rsync $DRYRUN -avh \ -exclude bla1 \ -exclude bla2 \ src tgtdir }; s

Re: How to evaluate a raw string?

2008-10-05 Thread Manfred Lotz
Mr. Shawn H. Corey wrote: On Sun, 2008-10-05 at 16:54 +0200, Manfred Lotz wrote: my $DRYRUN="--dry-run"; my $cmd = q(rsync $DRYRUN -avh \ -exclude bla1 \ -exclude bla2 \ src tgtdir }; system($cmd); my $Dry_Run = '

Re: How to evaluate a raw string?

2008-10-05 Thread Manfred Lotz
Dr.Ruud wrote: Manfred Lotz schreef: I like to specify a raw string, like for example $w: my $who = "my friend"; my $w = q(This is \n $who.); Now I want to evaluate that raw string so that the result is a string: This is my friend. eval doesn't seem to help. Actually I

How to evaluate a raw string?

2008-10-04 Thread Manfred Lotz
string where at the end of the day only variables get expanded. Any idea how to do this? -- Manfred -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

matrix problem

2005-01-24 Thread manfred
something like that in the db (but that I might need to ask in another list)? I reckon something like that has been covered before but I couldn't find it :-) Would be grateful for a hint in the right direction. --manfred -- http://glassdoc.org http://glassdoc.de -- To unsubscribe, e-mail: [

Re: Regex help

2005-01-16 Thread manfred
); if ($num =~ /^(\d+)\#([^\#]*?)\#(?:e\+(\d+))?$/x) { What particular use has the _x_ modifier in this example? I mean the hashes are escaped? --manfred ($base, $n) = ($1, $2); $exp = defined $3 ? $3 : 1; } elsif ($num =~ /^(\d[\d._]*?)(?:e\+(\d+))?$/) { ($base, $n) = (10, $1);

Antwort: Re: """Wallbanger@t-online.de""" aus Eurer Verteiung nehmen!!!!!

2004-10-29 Thread Manfred . Beilfuss
auszutragen. Daraufhin wirst Du eine Bestätigungsemail erhalten, die Du noch mal kurz beantworten musst ( ohne weiteren Inhalt )! Dann solltest Du keine Emails von der Liste mehr erhalten. Hi Gunnar , I just tried to translate you. Mit freundlichen Gruessen / Best regards Manfred Beilfuss

Antwort: Matching two seperate lines that begin with the same word

2004-10-06 Thread Manfred . Beilfuss
I could do all the sorting with sql-help even with perl or without ! Best regards Manfred >>Then I am going to clean up the rpmdb >>Any tips, apart from reading my llama book ;-) -- Just getting into the best language ever... Fancy a [EMAIL PROTECTED] Just ask!!! -- To unsubscri

Antwort: use perl to inquire database and send email automatically

2004-09-22 Thread Manfred . Beilfuss
he specific DBD or just DBD::ODBC ! HTH! Best regards Manfred Beilfuss -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Antwort: Edit a file inplace..

2004-07-22 Thread Manfred . Beilfuss
state-perl Mit freundlichen Gruessen / Best regards Manfred Beilfuss [

Antwort: RE: Antwort: FTPing of files between remote servers.

2004-07-20 Thread Manfred . Beilfuss
eundlichen Gruessen / Best regards Manfred Beilfuss [EMAIL PROTECTED]

Antwort: FTPing of files between remote servers.

2004-07-20 Thread Manfred . Beilfuss
freundlichen Gruessen / Best regards Manfred Beilfuss [EMAIL PROTECTED

Manfred Beilfuß/DVAG ist außer Haus.

2004-05-24 Thread Manfred . Beilfuss
Ich werde ab 13.05.2004 nicht im Büro sein. Ich kehre zurück am 04.06.2004. Ich werde Ihre Nachricht nach meiner Rückkehr beantworten. In dringenden Fällen die DB-Administration betreffend, bitte eine entsprechende Note an die Adresse dba-intel bzw. dba-host senden -- To unsubscribe, e-mail: [

Re: writing output to file

2004-04-22 Thread Manfred . Beilfuss
Hi Graeme, "Graeme McLaren" <[EMAIL PROTECTED

Antwort: Re: book suggestion for atypical beginner ['securiQ.Watchdog': überprüft]

2004-04-07 Thread Manfred . Beilfuss
em to do. But none of them work with use strict. Nor do I understand what the strict messages tell me. Mit freundlichen Gruessen / Best regards Manfred Beilfuss Deutsche Vermögensberatung AG IT_Systemmanagement , DBA Münchenerstr. 1 60329 Frankfurt Tel.: +49 (69) 2384 - 639 Fax: +49 (69) 2384 - 3

Antwort: Timezone conversion

2004-04-02 Thread Manfred . Beilfuss
Hi , I would try to convert your timestamp with localtime ( see perldoc -f localtime ) into separate variables and do the computing myself. But possibly time::localetime suits you and your needs better ??? Mit freundlichen Gruessen / Best regards Manfred Beilfuss Deutsche Vermögensberatung AG

Antwort: Project Advice Wanted

2004-03-30 Thread Manfred . Beilfuss
hope you may find something on sourceforge about it, Mit freundlichen Gruessen / Best regards Manfred Beilfuss Deutsche Vermögensberatung AG IT_Systemmanagement , DBA Münchenerstr. 1 60329 Frankfurt Tel.: +49 (69) 2384 - 639 Fax: +49 (69) 2384 - 329 Mailto:[EMAIL PROTECTED

Antwort: Compilation

2004-03-30 Thread Manfred . Beilfuss
yes Sir , there are several possibilities e.g. perlapp : J:\mbf>perlapp -? PerlApp 5.0.3 build 503 Copyright (C) 1998-2002 ActiveState Corp. All rights reserved. Usage: perlapp [options...]

Antwort: Search for a file pattern in a directory tree recursively / Stoting Info on hash's

2004-03-24 Thread Manfred . Beilfuss
@ARGV); print "$name ". scalar(laocaltime($age)) . "\n"; If you join these code-fragments and store filename, path, ext and age into a hash or other structure you should be able to solve your problem. If you succeed could you please tell me how ? Mit freundlich

Manfred Beilfuß/DVAG ist außer Haus.

2004-02-13 Thread Manfred . Beilfuss
Ich werde ab 09.02.2004 nicht im Büro sein. Ich kehre zurück am 16.02.2004. Ich werde Ihre Nachricht nach meiner Rückkehr beantworten. In dringenden Fällen die DB-Administration betreffend, bitte eine entsprechende Note an die Adresse dba-intel bzw. dba-host senden -- To unsubscribe, e-mail: [

Manfred Beilfuß/DVAG ist außer Haus.

2004-02-11 Thread Manfred . Beilfuss
Ich werde ab 09.02.2004 nicht im Büro sein. Ich kehre zurück am 16.02.2004. Ich werde Ihre Nachricht nach meiner Rückkehr beantworten. In dringenden Fällen die DB-Administration betreffend, bitte eine entsprechende Note an die Adresse dba-intel bzw. dba-host senden -- To unsubscribe, e-mail: [

Antwort: windows username

2003-11-11 Thread Manfred . Beilfuss
Hi, try to read what "perldoc -f stat" tells you! As being myself a beginner, I haven't tried it yet, just read about it. HTH! Best regards Manfred Beilfuss Deutsche Vermögensberatung AG IT-Systemmanagement / DBA Gutleutstraße 7 60329 Frankfurt Tel.: +49 (69) 2384 - 639

Antwort: RE: array of arrays

2003-10-20 Thread Manfred . Beilfuss
$b means (($a_min LE $b_min) & ($a_max LE $b_min) ) , that is how i would compare ranges . HTH & best regards Manfred

Re: Re: How to get fields from a SQL DB one by one

2003-10-15 Thread Manfred . Beilfuss
ema, $tabname ) = @$row; >> ... >> } and finally don't forget to close everything : >> # close selection criteria cursor >> $sth->finish(); >> close(OUTPUT); >> $dbh->disconnect(); Please note that this only one possibility to that job.

  1   2   >