Taint question

2004-07-16 Thread Marcus Willemsen
ne 1" When I run them from the command line. My first line always looks this #!perl -T Perl is integrated into the PATH. Is it because Windows is considered an insecure operating system and running scripts in Taint mode wouldn't help much?? Any suggestions? Thanks Marcus -- To

RE: Trouble with -T switch

2004-02-10 Thread Marcus Willemsen
27;t know why I didn't post my question there. But on the other hand using taint mode applies none CGI scripts as well, so I thought this list might be appropriate. Grettings Marcus > > - Jan > -- > If all else fails read the instructions. - Donald Knuth > -- To unsubscr

RE: Trouble with -T switch

2004-02-09 Thread Marcus Willemsen
read perldoc taint ?? I'm not explicitly untainting $ENV{'PATH'}. As far as I understood Programming Perl setting the path is enough, but apparently it is not. I thought only data has to be untained? > > How about not shelling out to sendmail in the above manner at >

Trouble with -T switch

2004-02-09 Thread Marcus Willemsen
TH'}") or die "Can't fork for sendmail: $!\n"; print SENDMAIL <<"FILE"; From: JUVE Newsline <[EMAIL PROTECTED]> To: <$a> . .etc } _Snippet__ Thanks Marcus Marcus Willemsen Online Redaktion Juve Verlag GmbH Sachsenring. 6 50677 Köln

Re: problem using bash variables with command-line perl in bash script

2003-11-28 Thread Marcus Claesson
perl is that the bash script is much bigger and does other things as well. I wanted a simple 'sed' command but couldn't make it work so I used that command-line perl instead. Regards, Marcus -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

problem using bash variables with command-line perl in bash script

2003-11-27 Thread Marcus Claesson
bles won't follow into the 'perl -ne' command, hence the 'Use of uninitialized value in substitution' messages. Does anyone know why and how I can make use of bash variables in that perl command? Would be very grateful for any output! Best regards, Marcus -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: How do I convert strings to floating number?

2003-10-14 Thread Marcus Claesson
T\n"; } } And I then get this: 1e-180 SMALL 0SMALL 1e-10 BIGGER 8e-86SMALL 6e-18BIGGER 1e-123 SMALL Argument "\x{34}\x{36}..." isn't numeric in numeric gt (>) at /home/marcus/Scripts/string2num.pl line 7, <> line 7. 5BIGGEST Argument &

How do I convert strings to floating number?

2003-10-14 Thread Marcus Claesson
-100 SMALL 2e-100 BIGGER 1e-45SMALL 5e-10BIGGEST 1SMALL 10 SMALL 20 BIGGER which is not matematically correct. How do convert "floating strings" to floating number? I thought "lt" would be the right one to choose... Thanks in advance! Marcus -- To u

RE: list-parsing problem

2003-09-18 Thread Marcus Claesson
Homework's sorted ;)! Thanks a lot Thomas, it worked fine! Marcus On Thu, 2003-09-18 at 10:41, Thomas Bätzler wrote: > Marcus Claesson [mailto:[EMAIL PROTECTED] asked: > > I have a silly little list-parsing problem that I can't get my head > > around, and I'm sure s

RE: list-parsing problem

2003-09-18 Thread Marcus Claesson
Thanks Michel, I found it! But I just have one question before trying it out. Isn't the key order in a hash randomised, which in this case means I wouldn't get first column in numerical order as I wanted? Marcus On Thu, 2003-09-18 at 10:31, EUROSPACE SZARINDAR wrote: > Hi Mar

list-parsing problem

2003-09-18 Thread Marcus Claesson
hem here), but nothing really works... I would really appreciate any help! Marcus -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Running shell script as root from Perl

2002-03-11 Thread Marcus
d simpler to manage (connection time stats etc) on the desktop. Users include many Windows converts. I guess this might be a question for a unix sysadmin, but then again the pipe syntax may be Perl specific. I don't suppose there are any around by chance? Thanks, Marcus -- To unsub

Re: Running shell script as root from Perl

2002-03-11 Thread Marcus
ny command with advanced options to run as any user, which is basically what I want to do. Thanks, Marcus -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Running shell script as root from Perl

2002-03-11 Thread Marcus
a way to pass the password with being prompted? (I'm not new to Perl, but new to Perl on *nix, so I feel like a beginner again.) Thanks, Marcus -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: read data from post or get ...

2002-03-06 Thread Marcus Rigby
heres a url that should help you out. http://www.cgi101.com/class/ Farshad Fekri Nejat wrote: > hi > how can i read data which be sent from a form in > html file by post or get ? for example in a form > i want get fist and last name of user and show those > by > a perl file .. > thanks > bye > >

Counting every character in a textfile

2002-02-14 Thread Marcus Willemsen
t = 0; my $text = 'c:\marcus\temp\bonn.txt'; open(TEXT, $text) or die "Konnte $text nicht öffnen"; while() { if(/[\d\D]/){ $count++ } } print $count; But it does

Perl on Microsoft Small Business Server?

2002-02-04 Thread Marcus Willemsen
Dear all, does anybody know if Perl runs on Microsofts Small Business Server? I know there are no problems using Perl on a Windows2000 Server. And if it runs on a SBS is it possible to start and shutdown services like Exchange and/or SQL-Server using perl scripts? Marcus Willemsen JuveVerlag

RE: accessing environment variables

2001-10-19 Thread HOLLAND-MORITZ,MARCUS (A-hsgGermany,ex1)
| If there is an easier/better way, I'm all ears. Use the variable $^O which contains the name of the operating system. It's "MSWin32" for Windows, for example. if( $^O eq 'MSWin32' ) { # ... } else { # ... } Hope this helps. -- Marcus | ---

RE: Problems using REGEXP

2001-09-11 Thread HOLLAND-MORITZ,MARCUS (A-hsgGermany,ex1)
| -Original Message- | From: Rupert Heesom [mailto:[EMAIL PROTECTED]] | Sent: Tuesday, September 11, 2001 6:00 PM | To: HOLLAND-MORITZ,MARCUS " "(A-hsgGermany,ex1) | Cc: '[EMAIL PROTECTED]' | Subject: RE: Problems using REGEXP | | | Thanks so much for the response

RE: If always verified

2001-09-10 Thread HOLLAND-MORITZ,MARCUS (A-hsgGermany,ex1)
ied even the last line don't | end with success. | | Why? I guess you wanted to write $lastline =~ /success$/. Perl interpolated the (likely non-existent) variable $success, so you matched against the empty string. (Which is hard not to succeed ;-) Turn your warnings on: #!/bin/perl

RE: Problems using REGEXP

2001-09-10 Thread HOLLAND-MORITZ,MARCUS (A-hsgGermany,ex1)
- $job{Ra} = 'Ra: 45k'; if( ($x) = $job{Ra} =~ /(\d\d)/ ) { print "the number is: $x\n"; } else { print "no number... :-(\n"; } --- Hope this helps. -- Marcus -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Looping

2001-09-07 Thread Marcus Willemsen
Never mind my question re looping, figured it out for myself -haven't thought hard enough.. Marcus -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Looping

2001-09-07 Thread Marcus Willemsen
o flaws. a) the record with the id 3 is gotten twice b) and all the records > 15 are not printed/sent at all. is there a better way to read from the database, send, sleep and start again? Thanx Marcus #!/usr/bin/perl use DBI; $dbh = DBI->connect("DBI:mysql:host:localhost;database

RE: References?

2001-09-03 Thread HOLLAND-MORITZ,MARCUS (A-hsgGermany,ex1)
You will find a lot more than I would be able to type quickly by looking at the 'perlref' manpage. Just type perldoc perlref at your shell prompt. -- Marcus | -Original Message- | From: Bert de Jong [mailto:[EMAIL PROTECTED]] | Sent: Tuesday, September 04, 2001 9:09 AM |

Re: comparing hash values

2001-08-25 Thread Marcus Holland-Moritz
You can check if a key is already in a hash table with Perl's exists() function. Have a look at 'perldoc -f exists' for details. Hope this helps. -- Marcus - Original Message - From: "Darfler, Jim (J.E.)" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>

Re: hash key with regexp - thanks & further question

2001-08-24 Thread Marcus Holland-Moritz
key for %hash. If you want to play around with the code, here's a complete script: #!/bin/perl -w use strict; my %hash = ( this => { A => 'valueA', B => 'valueB',

RE: How to close ALL open file descriptors

2001-08-24 Thread HOLLAND-MORITZ,MARCUS (A-hsgGermany,ex1)
--- This will close all existing file handles except for the 'standard' ones being ARGV, STDIN, STDOUT, STDERR, stdin, stdout and stderr. It simply searches the symbol table for file handles and, if they aren't the standard file handles, closes them. H

RE: Strip charactes from every element in array

2001-08-23 Thread HOLLAND-MORITZ,MARCUS (A-hsgGermany,ex1)
| and if the character isn't there | | @array(one1 two three1); | | I end up with | | one tw three @array = qw(one1 two1 three1); s/\d+$// for @array; print "@array"; -- Marcus | -Original Message- | From: John Edwards [mailto:[EMAIL PROTECTED]] | Sent: Thursday,

RE: Strip charactes from every element in array

2001-08-23 Thread HOLLAND-MORITZ,MARCUS (A-hsgGermany,ex1)
| Is there any easy way to strip a single character from every | element in an | array? @array = qw(one1 two1 three1); chop @array; print "@array"; Hope this helps. -- Marcus | -Original Message- | From: John Edwards [mailto:[EMAIL PROTECTED]] | Sent: Thursday, August 23,

RE: perl version

2001-08-23 Thread HOLLAND-MORITZ,MARCUS (A-hsgGermany,ex1)
| how could i know which perl version i am using : any command | on unix/linux perl -v or (more verbose) perl -V -- Marcus | -Original Message- | From: Rahul Garg [mailto:[EMAIL PROTECTED]] | Sent: Thursday, August 23, 2001 1:14 PM | To: [EMAIL PROTECTED] | Subject: perl version

Re: still: using fetchrow_hashref()

2001-06-27 Thread Marcus Willemsen
Thanks tried the row count with SELECT COUNT(*) and it works perfectly Thanks a lot

still: using fetchrow_hashref()

2001-06-26 Thread Marcus Willemsen
Thanks for the advise. I'll give it a try. Is there a possiblity to determin the size of the search result, i.e. did the search yield five headlines three or whatever number? And how do I access the elements. Grateful for answers Marcus At 09:51 25.06.2001 -0700, you wrote: >Y

using fetchrow_hashref()

2001-06-25 Thread Marcus Willemsen
st of the message. Can I acess the result of my first search somehow and pass it on to an new search?? Best regards Marcus 1 #!/usr/bin/perl -w 2 3 use DBI; 4 use CGI qw(:standard); 5 use CGI::Carp(fatalsToBrowser); 6 7 print header, start_html("Search"), h1("Search the