Handling OLD files

2008-03-27 Thread anders
ckage (ActiveState) if it is possible -- Anders -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Handling OLD files

2008-03-28 Thread anders
Thanks everyone for the help mvh Anders -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: perl byte code generation

2008-03-31 Thread anders
PREFERENS Tab: Repositories ADD Name Location: http://theoryx5.uwinnipeg.ca/ppms/ 2. Press OK 3. View -> All package 4- Select PAR-Packer version 0.976 5. Install The PP program is found on my machine under c:\perl\site\bin Work for me.. // Anders -- To unsubscribe, e-mail: [EMAIL

Problem with STAT under Windows

2008-03-31 Thread anders
I tryed some testkod below, i like Perl to give med TIME for every file, But all variable just get blank, (i got filename). # Reads all files to a list sub readFileList { my @result; local $dev; local $ino; local $mode; local$nlink; local $uid; local $gid; local $r

Re: Perl and "vi" (not "vim") , ctags like feature in Perl !

2008-08-26 Thread anders
ing sqlplus session ? > >    - Is there a ctags like facility for Perl as well ? > > Thanks & Regards, > Amit Saxena There is a serverprogram called Screens it can handle multiple screens and let you switch between, On VI you could enter :! to get a shell, test your progr

Regexp in PERL

2008-09-09 Thread anders
Hi i have som text with " and space and then a numbers eg. " 234234 I tested to write $line =~ s/\" [0-9]/[0-9]/g; I like it to change " 234 to "234 But it made "[0-9] Anyone how should i have write to tell it to find and convert corrent. Best regards Ander

Re: Regexp in PERL

2008-09-10 Thread anders
> > $line =~ s/" ([0-9])/"$1/g; > Thanks this solve the problem for me. Anders -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Trouble with activestate perl for windows

2007-08-30 Thread anders
s what the errro says. 1. The installation from activestate normal add the path to perl for you so test writing perl -v if not test C:/Perl/bin/perl -v // Anders. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: marine subroutine

2007-08-30 Thread anders
On 30 Aug, 09:39, [EMAIL PROTECTED] (Amichai Teumim) wrote: > Hi > > I'm trying to understand subroutines. > > #!/usr/bin/perl > > &marine() > > sub marine { > $n += 1; #Global variable $n > print "Hello, sailor number $n!\n"; > > } > > This doesn't work. Is &marine() incorrect? How would I cal

Re: Trouble with activestate perl for windows

2007-08-30 Thread anders
On 29 Aug, 22:17, [EMAIL PROTECTED] (Caduceus) wrote: > Every time I try to use perl 5.8.8 I keep geting the error message > "Barewood found where operator expected at - line 1, near "/perl/bin" > " What am I doing wrong here and how can > I fix it. I'm using activestate perl. The command I'm tryi

does perlcc gives tru standalones

2007-10-16 Thread anders
seen comersial software bur i have more os (Solaris, Irix, Mac ppc/intel redhat, Windows etc.. and would prefer en solution that works same for everyone. // Anders -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Insecure dependency in open while running setuid at

2007-10-23 Thread anders
i eg. C.. mutch easy with PERL.. // Anders -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Insecure dependency in open while running setuid at

2007-10-23 Thread anders
i eg. C.. mutch easy with PERL.. // Anders -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Quotes and apostrophes assistance

2007-10-29 Thread anders
Can't selectrow_array statement=SELECT id FROM images where > tiffpath='/data/finished/GB 10484/Camellia japonica > 'Mercury'2.NEF.tif': near "Mercury": syntax error(1) at dbdimp.c line > 271 I have the same problem but with C and SQLITE it is becurse the d

PAR-PP package on Windows

2007-11-16 Thread anders
found any under c:\perl Any ide.. // Anders -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: PAR-PP package on Windows

2007-11-16 Thread anders
Regards, Martin > > On 9:03:00 16/11/2007 anders <[EMAIL PROTECTED]> wrote: > > > I have installed PP (PAR-Package) under OS/X and it works fine > > > Under Windows i use ActiveState's PERL and PPM manager to > > install PAR, it works fine and it founds

Re: PAR-PP package on Windows

2007-11-16 Thread anders
Regards, Martin > > On 9:03:00 16/11/2007 anders <[EMAIL PROTECTED]> wrote: > > > I have installed PP (PAR-Package) under OS/X and it works fine > > > Under Windows i use ActiveState's PERL and PPM manager to > > install PAR, it works fine and it founds

Re: Different way of getting Standard input

2007-12-31 Thread anders
o the screen) c. STDERR (Defaults write to the screen to) STDOUT and STDERR have a mening that you allways write errormessage to STDERR and can redirect it to eg. a errorfile. IF you haven't redirect STDIN it reads from KEYBORD to MEMORY and don't give you any file that you can use, if

Eval scoping question

2009-12-08 Thread Anders Hartman
n print at ... asub should see the $abc variable in the main program, but doesn't. How do I make asub reference variables in the main program? /Anders -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: Eval scoping question

2009-12-08 Thread Anders Hartman
Jeff Pang skrev: Anders Hartman: Hello, I which to use eval to execute subroutines dynamically. The following code snippet fails: #!/usr/bin/perl use strict; use warnings; sub asub { our $abc; print $abc; } my $abc = "abc\n"; eval "asub"; exit 0; I don'

Thread::Pool

2004-05-24 Thread Anders Holm
A slight difference, which the doc's doesn't quite mention, and which may have a potentially large impact. So, anybody present which would have had experience with this? Just want to know if I need to change my approach or not.. Cheers! //Anders// -- To unsubscribe, e-mail: [EMAIL PR

Re: String issue?

2004-05-24 Thread Anders Holm
tion to your problem. What is the end product you are writing? May well be that there is somehting there already. If it is a monitoring application, I'd highly recommend http://www.nagios.org/ Then you don't have to roll your own.. ;) Enjoy! //Anders// On Mon, 2004-05-24 at 11:58,

Re: Directory Test in Windows?

2004-06-04 Thread Anders Holm
statement will match anything which isn't a dot "." or 2 dots ".." . I'll leave testing for valid directories as an excercise.. ;) //Anders// On Fri, 2004-06-04 at 13:13, Steve Gross wrote: > I'm trying to perform an operation on every file in a directory. I

RE: Directory Test in Windows?

2004-06-04 Thread Anders Holm
for. Try using -f instead of -d, and see what you get. The code snippet I sent in my last mail would iterate over any entry in a directory if it isn't . or .. HTH! //Anders// On Fri, 2004-06-04 at 14:34, Steve Gross wrote: > Sorry Anders, this script doesn't do what I

Re: splitting

2004-06-11 Thread Anders Holm
5\|gb\|AY358849.1\|/,$seq); Should lead you closer to a solution to your headaches.. //Anders// On Fri, 2004-06-11 at 08:51, aditi gupta wrote: > hi to all, > > i have a file $seq, in following format: > > gi|37182815|gb|AY358849.1| gi|2353725|gb|AF015490.1|AF015490 100.00 1

Re: split

2004-06-21 Thread Anders Holm
Jack Jack, how does this differ from your last mail (apart from naming conventions) ?? Is this homework perhaps? Sounds like it... There's some excellent resources on the web, but most notably they also tend to come with your distribution of Perl. perldoc perlre is one of those... HTH! //A

Re: Using regular expression as a variable.

2004-06-21 Thread Anders Holm
nto line 3 and not use the variable, the program works fine. Yes, single versus double quotes.. may want to look up the differences.. :D Leaving that as an exercise for the reader.. //Anders// -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://le

help: segmentation fault in threads program that use binmode

2011-06-08 Thread anders lee
when i use binmode in threaded program, i got a segmentation fault; i comment the binmode line, the program works well use threads; use threads::shared; use utf8; binmode(STDOUT, ':encoding(utf8)'; ---thread create and join- -- 使用 Opera 革命性的电子邮件客户程序: http://www.opera.com/m

help: segmentation fault in threads program that use binmode

2011-06-14 Thread anders lee
when i use binmode in threaded program, i got a segmentation fault; i comment the binmode line, the program works well use threads; use threads::shared; use utf8; binmode(STDOUT, ':encoding(utf8)'; ---thread create and join- -- 使用 Opera 革命性的电子邮件客户程序: http://www.opera.com/m

RE: #exec / perl ?

2002-04-29 Thread Anders Holm
Looks to me like your not allowed to execute cgi scripts in that directory. Have you checked your web servers configuration for this? Best Regards Anders Holm Critical Path Technical Support Engineer -- Tel USA/Canada: 1 800

Getting contens of file into a hash

2002-04-29 Thread Anders Holm
. Now the problem I have is that I'd like to get it into a hash, and I just can't figure out how to do this. I can split it up at the : delimiter, but I'm not sure how then to get in the data in a hash properly. More than likely I'm describing this completely wrong, but hey, I'm

RE: Getting contens of file into a hash

2002-04-29 Thread Anders Holm
Thank you Micheal!! Having loads of fun with this at the moment!! ;) There seems to be another caveat as well, SMP systems. ;) Fortunate enough to be able to test it on such a box at work. So, input would be something of the following: [anders@redhat anders]$ cat /proc/cpuinfo processor

RE: Getting contens of file into a hash

2002-04-30 Thread Anders Holm
r figuring out optimization parameters for building packages.. ;) Rip it apart or do whatever else you may feel that you just have to do with it.. Here we go then!! #!/usr/bin/perl -W # # This script created for educational purposes. # Intention is to check for number of cpu's and their type. # $au

RE: (OT) Klez virus

2002-05-02 Thread Anders Holm
r, as opposed to a mail filter engine.. ;) Best Regards Anders Holm Critical Path Technical Support Engineer -- Tel USA/Canada: 1 800 353 8437 Tel Worldwide: +1 801 736 0806 E-mail: [EMAIL PROTECTED] Internet:

Bulk mail tests

2002-05-03 Thread Anders Holm
Port => '25', Subject => 'Testing ISS mail service', Message => 'TEST' ); while($rcpt <= 1000) { $bulk->List("user" . "$rcpt" . "@mydomain.com"); } Best Regards Anders Holm Critical Path Tec

RE: Bulk mail tests

2002-05-07 Thread Anders Holm
Hi John. Sorry for my late reply, I'm checking these mails at work, and we had a Bank Holiday here yesterday. Cheers for the pointers! I'll play around with this a bit more to see what I get. Best Regards Anders Holm Critical Path Technical Suppor

RE: what uid owns process 0?

2002-05-10 Thread Anders Holm
Hi Drieux, you forgot to mention the platform... Linux: no PID 0 HP-UX: Don't have one handy, but remember seeing PID0 being "swapper", whatever that is.. ;) Solaris: See Linux. Best Regards Anders Holm Critical Path Technical S

RE: win32 mail

2002-05-24 Thread Anders Holm
t see _why_ you'd like to get a read reciept from _all_ the people on this list. Wake up. Best Regards Anders Holm -Original Message- From: Arran4 [mailto:[EMAIL PROTECTED]] Sent: 23 May 2002 14:05 To: Eric Wang; Timothy Johnson Cc: 'Tim Musson '; [EMAIL PROTECTED] Subject: R

RE: Shredding a file

2002-05-28 Thread Anders Holm
n on a journalled fs. Now, back to reality, pls! ;) Best Regards Anders Holm Critical Path Technical Support Engineer -- Tel USA/Canada: 1 800 353 8437 Tel Worldwide: +1 801 736 0806 E-mail: [EMAIL PROTECTED] In

RE: Shredding a file

2002-05-29 Thread Anders Holm
More than I wanted to know, thank you.. *LOL* k, let's get this OT off of here then with those lovely words from Nikola.. ;) Best Regards Anders Holm Critical Path Technical Support Engineer -- Tel USA/Canada: 1 800 353

sorting hash

2005-12-26 Thread Anders Stegmann
Hi! I have a script like: %hash = qw(1 A 2 B 3 C); while (($key, $value) = each %hash) { print "$key => $value\n"; } it prints out: 1 => A 3 => C 2 => B I want it to print out a sorted hash like: 1 => A 2 => B 3 => C How do I do that? Regards

Svar: RE: sorting hash

2005-12-26 Thread Anders Stegmann
Thanks for replying! I think I tried everything but that! Anders. Anders Stegmann Ph.d. student Royal Veterinary and Agricultural University Institute of Food Science Section of Food Microbiology Rolighedsvej 30 Building 2-74 Room R074 DK-1958 Frederiksberg C Tlf. +45 35 28 31 58 >>>

assigning list to hash entry

2006-01-15 Thread Anders Stegmann
Hi! how do I assign a list to a hash entry like $hash{$key}[0]. I mean, something like this: $hash{$key}[0] = @list; must work. Anders.

Re: assigning list to hash entry

2006-01-16 Thread Anders Stegmann
primary hash, so I know which entry has which value. Anders. >>>Shawn Corey <[EMAIL PROTECTED]> 01/15/06 7:16 pm >>> Anders Stegmann wrote: >Hi! > >how do I assign a list to a hash entry like $hash{$key}[0]. > >I mean, something like this: &g

retrieving from opendbm

2006-01-17 Thread Anders Stegmann
result_hash); regards Anders.

dbm again

2006-02-06 Thread Anders Stegmann
sh, 'hash_database', 0666) or die cannot save database_name to dbm\n; %dbm_result_hash = %hash; dbmclose(%dbm_result_hash); dbmopen(my %dbm_hash, 'hash_database', 0666); my ($key) = keys %dbm_hash; print $dbm_hash{$key}[2],\n; dbmclose(%dbm_hash); exit; Regards Anders.

Fwd: Re: dbm again

2006-02-06 Thread Anders Stegmann
>>>Anders Stegmann 02/06/06 1:02 pm >>> Thaks for replying! The hash has only one key, so it sould be okay. I get the output: Can't use string (ARRAY(0x648290)) as an ARRAY ref while strict refs in use at testhash6.pl line 8. When I run the script. It

RE: passing an empty string to a perl script via command line

2002-06-11 Thread Anders Holm
And, for completeness: I'd think that it's not *nix that ignores the "", but rather Perl says that the variable that you assign the value to would then be undefined and just refuses to work with it. - use strict; should give you a warning about that. Best Regards Ander

Putting values into hash

2002-06-11 Thread Anders Holm
ese lines either. NB. there is a newline after each \, hence why it doesn't just read them all in as one line... :( How can I go about doing this? My head's just gone into a stand still and I just need someone to wake me up I guess!! ;) TIA! Best Regards Anders Holm

RE: passing an empty string to a perl script via command line

2002-06-11 Thread Anders Holm
Hi Bob. Well, all I can now say is "DOH!". Oooppsie, my mistake.. ;) Too green on this yet.. Thanks for clearing up my confusions! Cheers! Best Regards Anders Holm Critical Path Technical Support Engineer -- Tel USA

RE: Putting values into hash

2002-06-12 Thread Anders Holm
NFIG is a filehandle for my output file, where I'm gathering more data than just this.. ;) I have a feeling that there will be takers for optimising this as well, so enlighten me if you wish Thanks for the help!! Best Regard

RE: Moving on....

2002-06-18 Thread Anders Holm
ting for the command to finish before running the second one. Not sure if this is the Perl way of solving this, bit it's the shell way of doing it so... PPL: Let me know if there is a better way to do this one ;) I.e. a Perl way.. ;) Best Regards Anders Holm Critical Path Technical

RE: executing a PERL script

2002-06-27 Thread Anders Holm
ring what you really want to achieve before giving any recommendations, for multiple reasons I think I know, I may be cynical, but in reality, what do you want to do? Build a web based virtual file server? Cheers! Best Regards Anders Holm Critical Path Techni

RE: CPAN Modules continued

2002-06-27 Thread Anders Holm
oy, and good hunting! ;) Best Regards Anders Holm Critical Path Technical Support Engineer -- Tel USA/Canada: 1 800 353 8437 Tel Worldwide: +1 801 736 0806 E-mail: [EMAIL PROTECTED] Internet: http://support.cp.n

RE: updating a file in place is almost working

2002-07-01 Thread Anders Holm
to the old log file, which is now ... For a further explanation on this, read up on inodes and how they work.. ;) If you already have a log rotation scheme in place, utilize that as opposed to inventing the wheel again. ;) Hope this clears up any questions. Best Regards Anders Holm Critical Path

RE: updating a file in place is almost working

2002-07-01 Thread Anders Holm
want. This should be easy enough to change to something dynamic, if you wish as well Enjoy! Best Regards Anders Holm Critical Path Technical Support Engineer -- Tel USA/Canada: 1 800 353 8437 Tel Worldwide: +1 801 736 0806 E-

RE: df hang inside script

2002-07-02 Thread Anders Holm
http://nfs.sourceforge.net/ It all depends on your setup and how the mounts are done etc. > Ideas? Just the ones above.. ;) //Anders// -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Copying from an array?

2002-07-02 Thread Anders Holm
(OUTFILE); You've forgotten to remove trailing whitespaces do this: foreach my $i (@array) { chomp $i; print OUTFILE "$i\n"; } and see what it looks like should be a bit better, methinks.. //Anders// -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: executing c program from perl and calling subroutines

2002-07-03 Thread Anders Holm
sual Perl books.. //Anders// -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Correlating Log entries

2002-07-03 Thread Anders Holm
time he has on his hands.. ;) (Sorry Drieux! ;) TIA! Best Regards Anders Holm Critical Path Technical Support Engineer -- Tel USA/Canada: 1 800 353 8437 Tel Worldwide: +1 801 736 0806 E-mail: [EMAIL PROTECTED] Internet:

RE: Correlating Log entries

2002-07-03 Thread Anders Holm
rom in any case!! Cheers! Best Regards Anders Holm Critical Path Technical Support Engineer -- Tel USA/Canada: 1 800 353 8437 Tel Worldwide: +1 801 736 0806 E-mail: [EMAIL PROTECTED] Internet: http://support.cp.net

RE: CGI and Oracle Question,

2002-07-05 Thread Anders Holm
Hi. Seems like something isn't installed properly: Can't locate auto/DBI/prepare.al in @INC You're missing a module or something. Not too familiar with DBI myself, so don't know which one, but checking search.cpan.org for DBI and Oracle might be helpful (?)... Best

RE: Path

2002-07-08 Thread Anders Holm
directory NET in your @INC which should contain SMTP.pm... ;) If you installed it properly, that's where it would have ended up. My guess is that you just copied in the SMTP.pm to @INC? :) //Anders// -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Using grep with Win32 perl?

2002-07-10 Thread Anders Holm
... :) Yes, grep() works in Perl. There was an "off-spring" in the *nix world where it was also made into a command line program, so one could "grep on a file" manually... I believe that it is this tool you are thinking of. Hope this clears up things for you. //Anders// --

RE: Date

2002-07-12 Thread Anders Holm
es. I think the list would like to know more exactly what you want to achieve in order to help you better... Thanks! //Anders// -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Still Can't get perl to work on Win2K Pro PC

2002-07-16 Thread Anders Holm
Cory, of course you'd need to be in the directory where "example.pl" is located. :) If you're not then you'd get that message. Otherwise it looks like things are setup nicely on your system. Enjoy your future Perl Hacking! :) Best Regards Anders Holm Critical Path T

SV: Beginer...Any free resources for Learning Perl

2001-06-13 Thread Per-Anders Sandberg
http://www.comp.leeds.ac.uk/Perl/start.html -Ursprungligt meddelande- Från: Jack Sorros [SMTP:[EMAIL PROTECTED]] Skickat: den 13 juni 2001 13:06 Till: [EMAIL PROTECTED] Ämne: Beginer...Any free resources for Learning Perl Hi guys, Are there any free resources for learning

Adding new path to @INC

2003-01-20 Thread Nils-Anders Persson
Hello PERL-gurus, I wonder if there is a way to add a new path to the @INC-array permanently under UNIX and, if so, how to do it. Regards, Nils-Anders -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

How bad is it to use global variables?

2003-01-23 Thread Nils-Anders Persson
Hello, I've seen many discussions regarding the use of "use strict". What i wonder is why is it so bad using global variables? And another question how do you define constants in perl? regards, Nils-Anders -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands,

Parsing XML

2003-01-27 Thread Nils-Anders Persson
ll takes way to long to process all the data. So my question is: Is there a better XML-parser than the XML::DT that I can use to transform XML into perl-variables? Regards, Nils-Anders -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

XML -> Perl-variables using XML::Parser

2003-01-29 Thread Nils-Anders Persson
Utbetaltbelopp (högst belopp enl utbetalningsorsak ovan)* 18585 Beloppet sätts in på ditt konto inom en vecka. 16299941 XX Regards, Nils-Anders -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

XML::Parser, getting parent from the char_handler

2003-01-31 Thread Nils-Anders Persson
Hello, Another XML-question. When the char_handler in XML::Parser is called it's easy to find which element that called it, but is there an easy way to tell the parent of the calling element? Regards, Nils-Anders -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e

Sorting an Array with classobjects

2003-02-27 Thread Nils-Anders Persson
Hello Perlgurus! I have made a small program that creates some instances of a classobject and puts them into an array. I want to sort this array in order of a specific value in the class. I was thinking of something like this but it doesn't work @sortarr = sort byvalue (@unsortedobjectarray) sub