Re: Beginner question

2006-11-30 Thread Bjørge Solli
the password to be read > in my script from a variable. Hope that clarifies my doubt. Read The Manual: http://www.die.net/doc/linux/man/man8/ncpmount.8.html system ("ncpmount -S $remote_ip -U $user_name -P $password $mount_point"); -- Bjørge Solli - Office:+47 55205847 Mohn-Sverdrupsenteret

Re: Beginner question

2006-11-30 Thread Bjørge Solli
hwan/prodScript/hereDocsGenMel.html -- Bjørge Solli - Office:+47 55205847 Mohn-Sverdrupsenteret, Nansensenteret, Høyteknologisenteret T47 Thormöhlensgate 47, 5006 Bergen, Norway - www.nersc.no Google Earth: www.nersc.no/GE - TOPAZ: topaz.nersc.no -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional c

Re: Looking for a Perl module for proper IP sorting

2006-11-13 Thread Bjørge Solli
.pm You can use the ip2num, sort and then num2ip. OR: You can represent them with IP-objects: http://search.cpan.org/~luismunoz/NetAddr-IP-4.004/IP.pm and then do the comparisment via >, <, >=, <=, <=> or cmp I've never used any, found them on search.cpan.org... -- Bjørge Solli -

Re: Spam from this list

2006-11-13 Thread Bjørge Solli
as not beginners@perl.org in either To: or CC: fields, are regarded as spam and dealt with accordingly. If you have a emailprovider that lets you set up server side filters this is in my opinion The Best Way. -- Bjørge Solli - Office:+47 55205847 Mohn-Sverdrupsenteret, Nansensenteret, Høyteknolo

Re: Hi everyone, who can tell me how to extract five texts on each side of an URI? Thanks

2006-11-08 Thread Bjørge Solli
output of that url, and your slow but working code people might be able to help you. -- Bjørge Solli - Office:+47 55205847 Mohn-Sverdrupsenteret, Nansensenteret, Høyteknologisenteret T47 Thormöhlensgate 47, 5006 Bergen, Norway - www.nersc.no Google Earth: www.nersc.no/GE - TOPAZ: topaz.nersc.no -

Re: Help, using script to edit router config (entering different modes automatically)

2006-10-27 Thread Bjørge Solli
, what? I don't know what to do next. Any idea? Tried Net::SSH::Perl? http://search.cpan.org/~dbrobins/Net-SSH-Perl-1.30/lib/Net/SSH/Perl.pm You can send multiple commands separately with that. -- Bjørge Solli - Office:+47 55205847 Mohn-Sverdrupsenteret, Nansensenteret, Høyteknologisenteret T47 Thor

Re: logfile rotation

2006-10-13 Thread Bjørge Solli
tead > of file.1, file.2 etc. Then you don't need rotate. This pseudo will do the same: rename log as log.`date +%F` remove oldest log As of this you will no longer be rotating. Please do not toppost: http://www.xs4all.nl/~hanb/documents/quotingguide.html -- Bjørge Solli - Office:+47 5

Re: Perl Script as a Cron Job

2006-10-11 Thread Bjørge Solli
On Wednesday 11 October 2006 13:35, Mazhar wrote: > I did not get the meaning of (Quote properly) http://www.xs4all.nl/~hanb/documents/quotingguide.html When it ways usenet, think email-lists too. -- Bjørge Solli - Office:+47 55205847 Mohn-Sverdrupsenteret, Nansensente

Re: Perl Script as a Cron Job

2006-10-11 Thread Bjørge Solli
gt; > > >> but the same is not running every 10 minutes. > > > > > > > >Once you have worked out your crontab syntax, almost all cron problems > > > > are > > > > > >due > > > >to permissions or environment. > >

Re: Perl Script as a Cron Job

2006-10-09 Thread Bjørge Solli
or try: */10 * * * * /path/script.pl http://en.wikipedia.org/wiki/Crontab http://www.computerhope.com/unix/ucrontab.htm -- Bjørge Solli - Office:+47 55205847 Mohn-Sverdrupsenteret, Nansensenteret, Høyteknologisenteret T47 Thormöhlensgate 47, 5006 Bergen, Norway - www.nersc.no Google Earth: www.nersc.n

Re: DBI

2006-08-03 Thread Bjørge Solli
my $insertid; ... eval { #some insertion $insertid = $dbh->{'mysql_insertid'}; }; ... At the moment $insertid is always set to 0. Thanks! -- Bjørge Solli - Office:+47 55205847 Mohn-Sverdrupsenteret, Nansensenteret, Høyteknologisenteret T47 Thormöhlensgate 47, 5006 Bergen,

Re: book to learn perl

2006-08-02 Thread Bjørge Solli
e fourth edition, july 2005 instead. I too recommend it. -- Bjørge Solli - Office:+47 55205847 Mohn-Sverdrupsenteret, Nansensenteret, Høyteknologisenteret T47 Thormöhlensgate 47, 5006 Bergen, Norway - www.nersc.no Google Earth: www.nersc.no/GE - TOPAZ: topaz.nersc.no -- To unsubscribe, e-mai

Re: DBI

2006-08-01 Thread Bjørge Solli
SQL type constants. This is done by > replacing 'use DBI;' above with: > > use DBI qw(:sql_types); > > Note that SQL_INT is not a valid type: you want to use SQL_INTEGER > instead. You can view all the available types with this bit of code, > taken from the document

DBI

2006-08-01 Thread Bjørge Solli
_DOUBLE" not allowed while "strict subs" in use at ./profiles2db.pl line 119. Bareword "SQL_DOUBLE" not allowed while "strict subs" in use at ./profiles2db.pl line 120. Bareword "SQL_DOUBLE" not allowed while "strict subs" in use at ./profil

when to use '&' Was: Passing a hash to a function

2006-07-19 Thread Bjørge Solli
On Tuesday 18 July 2006 18:05, Rob Dixon wrote: > Bjørge Solli wrote: > > On Tuesday 18 July 2006 16:45, John W. Krahn wrote: > >>Leonid Grinberg wrote: > >>>sub function > >>>{ > >>> my %operating_systems = &populate_ha

Re: Passing a hash to a function

2006-07-18 Thread Bjørge Solli
e ampersand? In /the Llama book/, including the ampersand is what they teach you. I find code a lot easier to understand at once if the ampersands are included, even though I know they don't always need to be. -- Bjørge Solli - Office:+47 55205847 Mohn-Sverdrupsenteret, Nansensenteret, Høytekn

DBI, execute_array

2006-07-06 Thread Bjørge Solli
is supposed to (for the case of mysql at least) contain something like SQL_VARCHAR and similar. I found the example here: http://search.cpan.org/src/TIMB/DBI_AdvancedTalk_2004/tsld077.htm Hope someone can help or direct me to a more comprehensive DBI tutorial on the web. Thanks! -- Bjørge Soll

Re: Want to start remote desktop thru the CGI script

2006-07-04 Thread Bjørge Solli
#x27;s? > > Browsers shouldn't be able to run arbitrary external programs without > manual intervention, so when I want to run a program at the browser's > end of the connection, I ask somebody at that end of the connection to > run the program. > > Hope this helps! >

Re: regex for date "dd-mmm-yy"

2006-06-06 Thread Bjørge Solli
| dec)-(\d\d)/i Untested... It does allow 31st of february and similar non existing dates though. I think this is easier to test afterwards using a module to get the maxdate in each month to compare with. Good luck! -- Bjørge Solli - Office:+47 55205847 http://www.nersc.no Nansen Environ

Re: What are the most successful applications of Perl? Thanks.

2006-05-23 Thread Bjørge Solli
On Tuesday 23 May 2006 13:41, Japerlh wrote: > What are the most successful applications of Perl? You don't define /successful/. How well you succeed depends on what your goal is... -- Bjørge Solli - Office:+47 55205847 http://www.nersc.no Nansen Environmental and Remote Sensin

Re: Stealing vs buying Was: Print

2006-05-22 Thread Bjørge Solli
On Friday 19 May 2006 23:30, Rance Hall wrote: > Kevin Viel wrote: > > Bjørge Solli wrote: > >> HOY! People spend years writing those books - buy it! > > > > Seconded. Under US law, you may copy one article or one *chapter* under > > certain circumstances.

Stealing vs buying Was: Print

2006-05-19 Thread Bjørge Solli
in the print > dialog I can see only one page > > How do i select all the pages so that I can print the entire book > > Kaushal > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > <http://learn.perl.org/> <http:

Re: ssi and Perl/CGI

2006-05-14 Thread Bjørge Solli
ugly urls likt this: Rewriterule ^(script)/(var1)/(var2)/(var3)$ $1.php?var1=$2&var2=$3&var3=$4 This way this... site.com/index/foo/bar/123 becomes site.com/index.php?var1=foo&var2=bar&var3=123 -- Bjørge Solli - Office:+47 55205847 http://www.nersc.no Nansen Environmental and Remo

Re: Perl 5.8

2006-05-10 Thread Bjørge Solli
to install from the media directly. Otherwise google is your friend:-) -- Bjørge Solli - Office:+47 55205847 http://www.nersc.no Nansen Environmental and Remote Sensing Center - Bergen, Norway Dept.: Mohn-Sverdrup Center for Global Ocean Studies and Operational Oceanography -- To unsubscr

Re: Setting variables with eval

2006-05-05 Thread Bjørge Solli
#x27;our'. > Could someone tell me why this happened, please? > Is it possible to change this so that the variable $a would get set? You might also use perl in oneliner-mode: perl -w -e '$a=1;print "$a\n";' See also the -n and -p parameters. > This is my very firs

references header Was: Chomp method

2006-04-27 Thread Bjørge Solli
one of the following aproaches: 1. quote what you are answering, and replying beneath it. 2. set your email client to include a propper References-header, so you don't start a new thread each time you post to the list. Please consider this as a friendly reminder. -- Bjørge Solli -- To uns

Re: Running Perl Code in Windows

2006-04-24 Thread Bjørge Solli
y other alternative for running the same without > > > installation > > > > of > > > > > Active State Perl on the machine. > > > > > > Thanks all in Advance.. > > > > > > Regards > > > Mazhar > > > > free perl f

Re: strange errormessage from script run in cron

2006-04-21 Thread Bjørge Solli
On Thursday 20 April 2006 23:31, John W. Krahn wrote: > Bjørge Solli wrote: > > On Thursday 20 April 2006 12:01, John W. Krahn wrote: > >>Bjørge Solli wrote: > >>>I have this as a part of my script: > >>> > >>>$ncfile = `ls -1 $mersea

Re: strange errormessage from script run in cron

2006-04-20 Thread Bjørge Solli
On Thursday 20 April 2006 12:01, John W. Krahn wrote: > Bjørge Solli wrote: > > I have this as a part of my script: > > > > $ncfile = `ls -1 $mersea_cat | head -1`; > > print $ncfile; > > > > It prints the desired first file in $mersea_cat, but _be

strange errormessage from script run in cron

2006-04-20 Thread Bjørge Solli
Any ideas? -- Bjørge Solli - Office:+47 55205847 http://www.nersc.no Nansen Environmental and Remote Sensing Center - Bergen, Norway Dept.: Mohn-Sverdrup Center for Global Ocean Studies and Operational Oceanography -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e

Re: dircopy Was: perl help

2006-04-18 Thread Bjørge Solli
should also work If you read the manual for dircopy you will see that it doesn't return a "successfull/unsuccesfull" boolean, but a list: my($num_of_files_and_dirs,$num_of_dirs,$depth_traversed) = dircopy($orig, $new); So the "junk" value you are refering to is the number of

Re: can not filter out commentary lines with reg-exps

2006-03-29 Thread Bjørge Solli
; {} > > But this does not work. The loop does never stop. > What goes wrong? I am really confused! Your * refers to the #, saying you want to match all # occuring at least 0 times. My * refers to the . and so my regex says match a # at the beginning of the line and the rest of

Re: [PBML] SED and AWK

2006-02-10 Thread Bjørge Solli
On Friday 10 February 2006 15:18, Chas Owens wrote: > perl -ne 'push @save, $_; shift if @save > 25; if (/Error: building > module/) {print; @save =()}' logfile.log Just curious. Do you actually print the 25 lines here? -- Bjørge Solli - Office:+47 55205847 cellph.:

Re: array iteration problem

2006-02-08 Thread Bjørge Solli
; } or just (untested): $letter_count{$_}++ for map lc, @letters; -- Bjørge Solli - Office:+47 55205847 cellph.:+47 91614343 Nansen Environmental and Remote Sensing Center - Bergen, Norway http://www.nersc.no Reception: +47 55205800 Dept.: Mohn-Sverdrup Center for Global Ocean Studies

perl-module ParseLex-2.15 install fails on make test

2006-01-16 Thread Bjørge Solli
.00% 1 t/test4.t 11 100.00% 1 t/test5.t 11 100.00% 1 t/test6.t 11 100.00% 1 t/test7.t 11 100.00% 1 Failed 7/7 test scripts, 0.00% okay. 7/7 subtests failed, 0.00% okay. make: *** [test_dynamic] Error 255 [EMAIL PR

Re: Combine multiple lines into one line

2006-01-16 Thread Bjørge Solli
the others with a single-space-prefix. There is probably some fancy shortcut for doing all of this in one line, but I don't know it. Yet... Enjoy! -- Bjørge Solli - Office:+47 55205847 cellph.:+47 91614343 Nansen Environmental and Remote Sensing Center - Bergen, Norway http://www.nersc.no