Re: passing variables

2001-10-19 Thread Martin
the best way is to bild a modul and include it with use dont forget to export the vars. Take a look on exporter modul hope it helps Martin Natalia Vasilchenko schrieb: > > Hello, all! > > I have some variables defined in file > > > > $user_ip = $ENV{'R

Re: regexp question

2001-10-19 Thread Martin
try this: my $title =~ s// /i; if ($header =~ /(^\S.+)()(\S.+$)/m) { $header =~ s///i; } print $header; hope it helps martin birgit kellner wrote: > my $header = "Joe DoeThe book I wrote yesterday"; > my $title; > if ($header =~ /(^\S.+)()(\S.+$

Re: using global variables in other files

2001-10-22 Thread Martin
Transform your pl file in a package and then use use to get variables, or qualify the full name : $modname:varname. define this variables global in modul or export the vars . take a look on Exporter Modul hope it helps martin ÷ÁÓÉÌØÞÅÎËÏ îÁÔÁÌØÑ áÎÁÔÏÌØÅ×ÎÁ wrote: > Hello, all! > &g

Re: undef function

2001-10-23 Thread Martin
delete deletes a hash key and undef undefines a variable nafiseh saberi wrote: > > hi all... > I read about "undef" a lot > but.. > I dont understand the difference between "undef" and "delete".. ? > and why do we use undef... > thx > __ > Best regards ..

Date Calculation

2001-10-24 Thread Martin
; $search_start = sprintf("%d", $midnight -> unix_seconds_since_epoch); $date_start_string = localtime($search_start); $date_start_string is Wed Oct 24 02:00:01 2001 do anyone know how to get local timezone and not greanwich time back ? Thanks Martin -- To unsubscribe, e-mail: [EMA

browsing html pages

2002-04-20 Thread Martin
thing according to this subject. Can anybody give me a hint (and/or suggest a good reference guide for Perl on the internet) ? Thanx in advance Regards Martin -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: beginners Digest 13 Mar 2006 05:54:58 -0000 Issue 2791

2006-03-12 Thread Martin
this Act of the Scottish Parliament waspassed by the Parliament on 15th December 2005 and received Royal Assent on 20th January 2006 Note: The date attribute should be recovered from the highlighted text. Regards, Martin. - Original Message - From: [EMAIL PROTECTED] To: beginners

regexp question

2001-06-07 Thread Martin Weinless
Hello, This is probably not a true beginners question - it refers to an example that I use in class when we discuss regexps. Here is the problem: take the regexp '.n+..?.?v*.' By all that is sacred, if we use the string 'supernova', there should be no match since there are too many characters

Re: regexp question

2001-06-07 Thread Martin Weinless
by a 2 bit company that can't stand 1 bit of competition. On Thu, 7 Jun 2001, Jeff 'japhy' Pinyan wrote: > On Jun 7, Martin Weinless said: > > >take the regexp '.n+..?.?v*.' > > > >By all that is sacred, if we use the string 'super

Substitution Problem

2001-06-08 Thread Mark Martin
______ Mark Martin Computer Centre National University of Ireland Maynooth Tel: (01)708 4716/3830 Fax: (01)628 6249

Re: readline fails on Sun machines?

2001-06-11 Thread Greg Martin
Quite possibly have the wrong location of perl. I would type: cd / whereis perl you can manually check /usr/bin and /usr/sbin Once you find perl you can simply update your shibang line. Let me know if that helps. Greg Martin Verio TSG [EMAIL PROTECTED] - Original Message - From

Newbie Deleting Table Records Problem

2001-07-10 Thread Mark Martin
32. Cheers - Mark _____ Mark Martin Computer Centre National University of Ireland Maynooth Tel: (01)708 4716/3830 Fax: (01)628 6249

Re: Starting a script with command line arguments

2001-07-19 Thread Martin Schneider
1]\n";# 2nd command line argument. print "Count is: $count\n";# Number of arguments. carp "Not enough arguments to get started" unless $count > 0; @ARGV stores command line arguments. For more sophisticated command line support, look at the GetOpt modules. HTH, Martin -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

execute if NOT true.

2001-08-06 Thread Scott Martin
I am testing a string like so: if ($url =~ /maincat/) { block } but I want to execute if it does NOT find maincat. How would I do that? Could I use a ! in front of the = thanks -Scott

RE: Remove White Space

2001-08-06 Thread Scott Martin
any ideas? -Scott -Original Message- From: Bob Showalter [mailto:[EMAIL PROTECTED]] Sent: Monday, August 06, 2001 4:45 PM To: '[EMAIL PROTECTED]' Subject: RE: Remove White Space > -Original Message- > From: Scott Martin [mailto:[EMAIL PROTECTED]] > Sent: Mond

RE: Remove White Space

2001-08-06 Thread Scott Martin
Scott Martin [mailto:[EMAIL PROTECTED]] Sent: Monday, August 06, 2001 3:56 PM To: Perl Help Subject: RE: Remove White Space After I sent it out, I actually came up with the idea myself after some digging. (go figure) any case, I am now having another problem which, even after some research still p

Remove White Space

2001-08-06 Thread Scott Martin
How can I remove white space from the beginning of a variable? -Scott

RE: Remove White Space

2001-08-06 Thread Scott Martin
]] Sent: Monday, August 06, 2001 5:01 PM To: 'Perl Help' Subject: RE: Remove White Space What happens when you try? -Original Message- From: Scott Martin [mailto:[EMAIL PROTECTED]] Sent: Monday, August 06, 2001 4:05 PM To: 'Mooney Christophe-CMOONEY1' Cc: 'Perl Help&#

RE: Remove White Space

2001-08-07 Thread Scott Martin
I am stumped, none of these are working. I even tried something like $url=~s/\t*^\.htm/\.htm/g But I'm not sure if that is even remotely close. Incase this might help, here are a couple of lines BEFORE my new line. $url = substr($url, 18, -3); #removes the java script text to get the

RE: Remove White Space

2001-08-07 Thread Scott Martin
Ahh!! Thanks for help. That did it. -Scott -Original Message- From: Jeff 'japhy/Marillion' Pinyan [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 07, 2001 11:46 AM To: [EMAIL PROTECTED] Cc: Perl Help Subject: RE: Remove White Space On Aug 7, Scott Martin said: >I am

FW: PERL IS NOT A HIGH LEVEL LANGUAGE

2001-08-17 Thread Gene Martin
>Subject: PERL IS NOT A HIGH LEVEL LANGUAGE Just a note from a VERY NEWBIE; On my new copy of O-Reilly's Programming the Perl DBI, page 3 under the subheading of Perl, it states plainly that "Perl is a very high-level language." I have a hard time convincing my professors in college to take Perl

RE: [drifting OT]Re: PERL IS NOT A HIGH LEVEL LANGUAGE

2001-08-20 Thread Gene Martin
>>>Dean Theophilou Genisar wrote: >>>The only good thing about the nasty little Kobols are that they have >>>only 1-4 hit points (if I remember correctly). :)) That would be Kobolds, which have 1/2 hit die (1-4 hit points), have faces like dogs and bark like them... Gene (who played way too mu

RE: [drifting OT]Re: PERL IS NOT A HIGH LEVEL LANGUAGE

2001-08-21 Thread Gene Martin
>>Dean Theophilou [[EMAIL PROTECTED]] wrote >>Yes, that's right, but they program in "Kobol". :)) Then how do they keep all those variables that you have to declare in Cobol (you can't just use a variable in a print out, if you want to suppress zeros and stuff like that). I could never keep all

Removing Leading Zeros

2001-04-19 Thread Mark Martin
Hi all, I have sucked two substrings into two variables : $index = substr $_, 35, 11; $value = substr $_, 64, 6; These variables may or may not have leading zero/s : 09/99/000999and so on. If they do I need to strip away the leading zeros. Any ideas? Mark

Removing Leading Zeros

2001-04-19 Thread Mark Martin
Hi all, I have sucked two substrings into two variables : $index = substr $_, 35, 11; $value = substr $_, 64, 6; These variables may or may not have leading zero/s : 09/99/000999and so on. If they do I need to strip away the leading zeros. Any ideas? Mark

DBI and ORACLE

2001-04-20 Thread Mark Martin
h variables from the csv file. I'll probably create those with a simple split. any ideas? Mark _____ Mark Martin Computer Centre National University of Ireland Maynooth Tel: (01)708 4716/3830 Fax: (01)628 6249

Am I asking too much????

2001-04-24 Thread Mark Martin
chingcheques3.pl line 123, chunk 7. _____ Mark Martin Computer Centre National University of Ireland Maynooth Tel: (01)708 4716/3830 Fax: (01)628 6249

Problem Binding Variables : DBI

2001-04-26 Thread Mark Martin
$sth2->execute(); } close (FILE2); _ Mark Martin Computer Centre National University of Ireland Maynooth Tel: (01)708 4716/3830 Fax: (01)628 6249

Date stamping files

2001-05-01 Thread Mark Martin
RE ??? $b = "filename.$a.txt"; # NOT SO SURE ABOUT THIS EITHER??? open (OUT2,">$b"); Thanks a lot! _____ Mark Martin Computer Centre National University of Ireland Maynooth Tel: (01)708 4716/3830 Fax: (01)628 6249

IF statements

2001-05-01 Thread Mark Martin
orten that to if (variable == "02" OR "03" OR "08"){ .etc I think what I need is something called a case. but I can't find the syntax anywhere. Cheers. _ Mark Martin Computer Centre National University of Ireland Maynooth Tel: (01)708 4716/3830 Fax: (01)628 6249

Opening dtterm or xterm for input.

2001-05-03 Thread Martin McNelis
Hi, I'm running Perl 5.6 on Solaris 2.6 and I'm having the following problem: #!/usr/local/bin/perl $pid = open (SCF, '|dtterm -name SCF'); sleep 10; print SCF "ls\n"; close SCF; As you can see I'm trying to pipe input to dtterm, but nothing happens. Any he

Using Expect.pm to spawn Dtterm

2001-05-04 Thread Martin McNelis
hgaving no success either. Has anyone tried this before with any success? Thanks, Martin Martin McNelis Software Test Engineer Tecnomen Ltd. Phone: 061 - 702342 Mailto:[EMAIL PROTECTED]

"foreach" Trouble

2001-05-11 Thread Mark Martin
te stamp isn't found and the foreach loop never entered. Any Ideas? Mark _ Mark Martin Computer Centre National University of Ireland Maynooth Tel: (01)708 4716/3830 Fax: (01)628 6249

DBI and MS Access????

2001-05-14 Thread Mark Martin
ss DB : $dbh1 = DBI->connect( "dbi:??:??", "username", "password" ) . Do I need some software for this? Cheers, Mark _____ Mark Martin Computer Centre National University of Ireland Maynooth Tel: (01)708 4716/3830 Fax: (01)628 6249

"BETWEEN" Comparison Operator

2001-10-18 Thread Mark Martin
tr\n"; } I can only seem to do this with 2 conditional statements(IF & ELSIF) and the action repeated. What I want is a "Between" operator for the range -10 to 10. Any ideas, Mark _ Mark Martin Computer Centre National Un

Time - calculation

2001-10-24 Thread Martin Pfeffer
onth.$day 00:00:01)); $search_start = sprintf("%d", $midnight -> unix_seconds_since_epoch); $date_start_string = localtime($search_start); $date_start_string is Wed Oct 24 02:00:01 2001 do anyone know how to get local timezone and not greanwich time back ? Thanks Martin -- To

Time Calculation

2001-10-24 Thread Martin Pfeffer
; $search_start = sprintf("%d", $midnight -> unix_seconds_since_epoch); $date_start_string = localtime($search_start); $date_start_string is Wed Oct 24 02:00:01 2001 do anyone know how to get local timezone and not greanwich time back ? Thanks Martin -- To unsubscribe, e-mail: [EMA

Re: Regex frustration...

2001-10-24 Thread Martin Pfeffer
try to split the lines like: my ($var1, $var2,$var3,$var4) = split /:/, $line; # for every line of file than you can work with this as you like or you can split into array or in hash like this $hash{w1}{w2}{w3}{w4} = anything to control and than work with this hash Hope it helps Martin Daniel

Re: Persisting Values Across Method Calls

2001-10-30 Thread Martin Pfeffer
you can create a object or use clouses. hope it helps Martin Rex Arul wrote: > Friends, > > How can I persist values across method calls, without using Global > Variables? IS there kind of "static" variables and if so can any of you > provide a simple code e

C++ in, XML out

2001-11-01 Thread Martin Schneider
s this the best way to extract blocks of code? Does it look like I'm on the right track, or can you see a cliff ahead? Thank you, Martin use strict; use XML::Generator; my # variables listed here # open (FIL, "$ARGV[0]") or die "Can't open input fi

regexp question

2001-11-03 Thread Martin Karlsson
! -- Martin Karlsson [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: regexp question

2001-11-03 Thread Martin Karlsson
Thanks Jeff! Works like a charm! Be well! /Martin * Jeff 'japhy' Pinyan ([EMAIL PROTECTED]) wrote: > On Nov 3, Martin Karlsson said: > > >Could anyone give me a push in the right direction, please? > >How do I write a regexp that matches double instances of letters

regexp with $ARGV

2001-11-04 Thread Martin Karlsson
it won't. Thanks, -- Martin Karlsson [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: regexp with $ARGV

2001-11-04 Thread Martin Karlsson
Hi! Thanks for your help, I really appreciate it. However, I just don't seem able to figure out how to do it; please have a look at the attached script. Perhaps you can find some stupid rookie-mistake in it which could explain why it's not working the way I want :-). Have a nice wee

Re: installing modules

2001-11-09 Thread Martin Pfeffer
Install the CPAN Module Then type install Modulname Hope it helps martin Rahul Garg wrote: > well, > > i want to install modules on my system(linux) that i have made. > what i know is they are to be installed at @INC. > but exactly how.any suggestions > any s

Activ state Perl Dev Kit

2001-11-09 Thread Martin Pfeffer
does anywone has experience about Activ state Perl Dev Kit? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Table

2001-11-09 Thread Martin Pfeffer
better way to do this Like the Html::Pager module but i need only one table no buttons for forward and back Thanx martin -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: is there another way to do this?

2001-11-08 Thread Martin Pfeffer
my $machine = $ENV{HOSTNAME}; martin Mark Johnson wrote: > Is there another way to get access to the environment variables... this > works, but it seems kind of kludgy.. > > my $machine = `echo \$HOSTNAME`; > > Also, is there a way to detemine whether the script is

Re: Help with global match and replace

2001-11-19 Thread Martin Pfeffer
$thestring =~ s/'/ /g; martin FLAHERTY, JIM-CONT wrote: > My script dumps file name into a mysql DB on redhat 7.1 linux . The problem > I have is sometime windows files has a single quote ( ' ) in the name. I > want to replace it with a space . I not strong on pattern mat

Re: using perl-command line not working

2001-11-20 Thread Martin Pfeffer
you must escape " this will work: perl -e "print \"@inc\";" by martin Moulas, Lionel wrote: > Hi. > First post here, simple question. > > Trying, under the msdos command line (WinNT, "cmd"), > perl -e ' print "@INC"' >

HTML::Templ - Error in Doc

2001-11-20 Thread Martin Pfeffer
::Template->new(filename => 'zap.tmpl', filter => $filter); Without semicolon it doesnt work martin -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Profiler for Windows

2001-11-20 Thread Martin Pfeffer
sometimes you can see this in the readme file martin Gross, Stephan wrote: > Does dprof work on Windows? Does any profiler? How do you know from CPAN > if a module is windows compatible or not? > > ___ > Stephan Gross

Re: Command Line arguments.

2001-11-21 Thread Martin Pfeffer
On Tue, 20 Nov 2001 23:50:54 -0500, you wrote: my @args = @ARGV; @ARGV contains the command line parameter. martin >In article <[EMAIL PROTECTED]>, > [EMAIL PROTECTED] (Nicolae Popovici) wrote: > >> Hi guys, >> >> Can anyone tell me how can I take the

Re: extracting *just* matched text

2001-11-21 Thread Martin Pfeffer
contains the text in () in secound () is $2 and so far hope it helps martin -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Has modul an error ?

2001-11-27 Thread Martin Pfeffer
Hi all I write the following code and he works fine : use DBI; my $dir = "/Webserver/www.xxx.at/martin/cgi-bin/test/"; my $dbh = DBI -> connect("DBI:CSV:") || die "$1 --- $DBI::errstr"; $dbh->do("CREATE TABLE testtablex (id INTEGER, name CHAR(6

Re: Parameters

2001-11-28 Thread Martin Pfeffer
what kind of problem you hav ? martin On Tue, 27 Nov 2001 22:04:25 +0530, you wrote: >I'd like some help running single line programs from the command line with >the -e parameter. I keep having problems. > >Thanks. > >Pc > > > >__

Cpan Modul creation

2001-11-28 Thread Martin Pfeffer
hi to all Does anyone know where i can find a documentation to make my Modul CPAN conform? I mean with makefile and and testscript and so on. I mean not perldoc makemaker. Thanx Martin -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

CPAN usage

2001-11-30 Thread Martin Pfeffer
work with cpan and local mirror Thanx Martin -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Using CGI locally

2001-11-30 Thread Martin Pfeffer
but you can local install a webserver on localhost and do this On Thu, 29 Nov 2001 22:00:48 -0500 (EST), you wrote: >On Fri, 30 Nov 2001, Clive Lansink wrote: > >> I know that when I call up a local HTML file from within Internet >> Explorer it works and renders the HTML correctly. Now is there

Re: getting individual lines

2001-12-04 Thread Martin Pfeffer
Another way will be to read the statementlines into a hash and execute exact the ky you want Martin On Mon, 3 Dec 2001 20:17:36 -0500 (EST), you wrote: >On Mon, 3 Dec 2001, Tyler Longren wrote: > >> I have a HUGE document full of very simple SQL queries. Each query only >>

Re: subs in while loops

2001-12-04 Thread Martin Pfeffer
another way will be to define $test as local so all subs called from the sub where is defined local $test has access to $test Martin On Mon, 3 Dec 2001 23:34:59 -0500 (EST), you wrote: >On Tue, 4 Dec 2001, Daniel Falkenberg wrote: > >> Hi All, >> >> while(1) { >>

RE: substitution

2001-12-21 Thread Herb Martin
ng our early Perl work. There are INDEED stupid questions -- this is NOT one of them. Keep learning... Herb Martin, MCT, MCSD, MCSE [EMAIL PROTECTED] http://LearnQuick.Com 512 388 7339 -or- 1 800 MCSE PRO Accelerated MCSE in a Week Seminars -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

UNIQUE KEY

2002-01-15 Thread Mark Martin
Hi, I'm trying to maintain a unique key in an Oracle Table while working on the table using DBI. the unique key is just a no. read in from a txt file and incremented for each record - supposedly. In fact I'm getting unique constraint violation. Can anybody tell me what is wrong with this code,(the

Fianacial Julian Dates

2002-01-17 Thread Mark Martin
Hi, I'm trying to use the Time::JulianDay module to work with Julian Dates. However the dates are in a Financial system where today - 17/01/02 is represented by the Julian Date 102017. Any Julian Date calendee though will tell you today is 2452291.5 I'm lost - does anybodsy have any ideas? Mark

Editing file

2009-03-20 Thread Martin Spinassi
Hi list! I've just started with perl, but I'm really excited about its power. I'm trying to edit a file, but couldn't find out how to do it without making a temp file. I've been searching for the solution, but all I find is how to do it from command line, adding a "-i" to the execution. My scrip

Re: Editing file

2009-03-20 Thread Martin Spinassi
On Fri, 2009-03-20 at 18:48 +0100, Gunnar Hjalmarsson wrote: > Martin Spinassi wrote: > > Is there any way to open a file for input and output at the same time? > > Yes. Open it with the '+<' MODE. > > open my $fh, '+<', $file or die "Cou

Re: Editing file

2009-03-20 Thread Martin Spinassi
On Fri, 2009-03-20 at 11:07 -0700, John W. Krahn wrote: > Martin Spinassi wrote: > > Hi list! > > Hello, > > > I've just started with perl, but I'm really excited about its power. > > I'm excited that you're excited! ;-) I'm e

Including config file

2009-08-10 Thread Martin Spinassi
Hi list! I want to include some config and variables files into my perl script, but couldn't find the way to do so. All I found is methods to include some modules, "use", and so... Is there something like the ". file" in bash to include it into the script? Cheers Ma

RE: Including config file

2009-08-10 Thread Martin Spinassi
On Mon, 2009-08-10 at 15:37 -0400, Gorrebeeck, Robert wrote: > Martin > > What you want to do is use the require function > > require "directory/filename"; > > Within your config file > > You would set up the variables like this in your config file > #VA

Re: Including config file

2009-08-10 Thread Martin Spinassi
On Mon, 2009-08-10 at 16:13 -0400, Chas. Owens wrote: > On Mon, Aug 10, 2009 at 16:07, Martin Spinassi wrote: > snip > > It's working I don't have any issues with that :), but I'd like to know > > something...can I make it work with "use strict"? >

Re: Including config file

2009-08-11 Thread Martin Spinassi
On Mon, 2009-08-10 at 17:14 -0400, Chas. Owens wrote: > On Mon, Aug 10, 2009 at 16:56, Martin Spinassi wrote: > snip > > The problem with that, is that one variable is added/removed from the > > global config, then it should be changed at the script. > > > > I don&#

RE: How to set LD_LIBRARY_PATH

2010-05-29 Thread Martin Gainty
A workaround for LD_LIBRARY_PATH for me is to locate my Java jvm.dll in $JRE_BIN/bin/server and the resource dlls are in $JRE_HOME/bin the other libraries are on $PATH Martin Gainty Nimziki:Rabbi i'm not jewish.. Rabbi Levison: ..Nobody's Perfect.. (excerpt from movie &qu

Problem with Gd module and animated Gifs

2010-07-04 Thread Mike Martin
Hi I am looking at creating animated gifs using this in the man page as a starting point my $gifdata = $image->gifanimbegin; $gifdata .= $image->gifanimadd;# first frame for (1..100) { # make a frame of right size my $frame = GD::

Get variable name from a list

2010-07-24 Thread Mike Martin
Is this possible? I am trying to populate a hash with keys as variable name and value as variable value eg: my %hash; foreach my $w ($filename,$file_start,$file_time,$video_track,$audio_track,$quality,$sync){ my $hash{$key}= $w; } -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For

Question about match behaviour

2010-08-04 Thread Mike Martin
Hi I have the following code my $type='val'; my $type_g; foreach my $key (keys %options){ my $chk=$options{$key}->[3]; $type_g=$options{$key}->[4] if $chk=~/$type/; #$type_g=$options{$key}->[4] if $type=~/$chk/; } print "\n",$type,"\t",$type_g,"\n"; This fails but if I replace $type_g=$options{$ke

Re: Question about match behaviour

2010-08-05 Thread Mike Martin
- Show quoted text - On 5 August 2010 04:58, Chas. Owens wrote: > On Wed, Aug 4, 2010 at 11:36, Mike Martin wrote: > snip >> This fails but if I replace >> $type_g=$options{$key}->[4] if $chk=~/$type/ >> >> with either >> $type_g=$options{$key}->[4]

Re: Question about match behaviour

2010-08-05 Thread Mike Martin
On 5 August 2010 03:39, John W. Krahn wrote: > Mike Martin wrote: >> >> Hi > > Hello, > >> I have the following code >> my $type='val'; >> my $type_g; >> foreach my $key (keys %options){ >> my $chk=$options{$key}->[3]; >>

RE: setting unix command through perl script

2008-04-16 Thread Martin Barth
i think this is not possible. if you start a new process (shell) it gets the environment of its parent process. but if you manipulate the environment in a child the parent will not notice this.. for example $ bash $ export FOO=BAR $ echo $FOO BAR $ exit $ echo $FOO Regards Martin On 14:20

RE: setting unix command through perl script

2008-04-17 Thread Martin Barth
e to your shell configuration file. (.bash_profile or .zshrc ...) Regards Martin On 9:05:15 17/04/2008 <[EMAIL PROTECTED]> wrote: > I want to execute "export CCASE_NO_FILE_HEADER=yes" command in Perl > script. > If I run this command on bash prompt then it is executing

RE: setting unix command through perl script

2008-04-17 Thread Martin Barth
Hi, maybe yes. why do you need this variable to be set/changed? tell us some more about your objectives, please. Regards Martin On 11:25:01 17/04/2008 <[EMAIL PROTECTED]> wrote: > Hi, > > OK. Thanks. > > IS there any other mechanism to achieve this?? > > Regards

RE: setting unix command through perl script

2008-04-17 Thread Martin Barth
hi, you could do something like that: qx(CCASE_NO_FILE_HEADER=yes /path/to/your/task); this would set the variable only for this task. HTH, Martin On 11:48:35 17/04/2008 <[EMAIL PROTECTED]> wrote: > Thanks for your help. > > Actually , I am automating one task in Perl in which

RE: setting unix command through perl script

2008-04-17 Thread Martin Barth
idual Software Solutions - UMO > T-Systems India Private Limited, Pune > Telephone: +91-20-30245000/25605000 (Extn: 5271) > Mobile: +91 9822 854 227 > Fax: +91-020 25674090 > Internet: http://www.t-systems.com > > > -Original Message- > From: Martin Barth [mailto:[EMAIL PR

How to get a computed string to act as a re in if statement

2008-07-30 Thread Mike Martin
Hi I am working on the sub below. The aim is to create a string from values passed to the sub-routine and then use that as a if criterion for the push operation. Is this possible? sub get_list { my ($black_list,$table,$crit)[EMAIL PROTECTED]; ### $crit is a hash reference containing key to s

Re: Regex in a variable

2008-09-01 Thread Martin Barth
what about qr()? have a look at perldoc perlop if it fits your needs. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: printing array elements

2008-10-09 Thread Martin Barth
Hey, > print "$array[0],$array[1],$array[2]"; etc. There are different ways: 1) print @array; usually you want to see which element is at which index so 2) print join(" - ", @array); is maybe better. HTH Martin -- To unsubscribe, e-mail: [EMAIL PROTECTED] For

Starting with ::

2008-12-02 Thread Martin Barth
Hello, whats the difference if you start a variable with :: for example: $::a $a $main::a or: Package Foo; $::a # <- this is still main?! $::Foo::a $Foo::a $a didn't found information in the perldoc. Regards Martin -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional com

Re: Starting with ::

2008-12-02 Thread Martin Barth
> > $::Foo::a > > This is a shortcut for $main::Foo::a % perl -e 'package Foo; $a = 2; print $::Foo::a' 2% % perl -e 'package Foo; $a = 2; print $Foo::a' 2% 2 so every package is a "subpackage" of main? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

problems parsing web form information into a perl script

2004-03-03 Thread Mark Martin
Hi, I've got a web form that allows a user to browse to an excel file on their computer and input it and the year as parameters to run a perl script FORM : SCRIPT: use CGI; use Spreadsheet::ParseExcel; $q=new CGI; my $oExcel = new Spreadsheet::ParseExcel; my $user_ssheet=$q->param('file');

DBI - an easier way??

2004-03-10 Thread Mark Martin
Hi, bin using DBI for a while for data warehousing type stuff and up till now I've had to change data on the fly as it moves from one database to another : my $sql01 = qq{SELECT FIELD01 .FIELDn FROM PRODUCTION_TABLE}; my $sql02 = qq{INSERT INTO ACC_LEDG VALUES (?,?,?); my $sth =

Re: DBI, DBD question

2004-03-16 Thread Mark Martin
Pretty new to PPM myself but I have gotten DBD and DBI working fine on ActiveState for windows through it. PPM does take a bit of tricking around and I've found you are much better off creating local repositories. Here's 'tips n tricks' sheet that may help. - Original Message - From: "Ran

My DBI script wont UPDATE a Table!

2004-04-02 Thread Mark Martin
Hi, I designed my application on a test database and it worked fine without commiting the database handle. But now when I've moved it to the production database my updates wont commit - even when I do issue a commit on the DBH?!?! while(certain condition) { $s

loop using backticks stalls after ~30x

2004-04-02 Thread Martin Lercher
.8.0 under Linux] Cheers, Martin -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Re: Error in Script

2004-04-04 Thread Martin Lercher
etoopen; open(IN, "<$filetoopen") || die "cannot open file\n"; ... Martin -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Load a CSV / Excel File into a database table

2004-04-15 Thread Mark Martin
Hi I've thrown this query at the mailing list before but I'm still stuck I'm afraid. I have an Excel file with a worksheet that looks like: A BC D - 1¦ STUD_ID GEOG MATH 2¦1

Array with unique elements only

2004-05-20 Thread Mark Martin
Hi, I'm moving database data from table to table and want to make sure I'm getting only unique records. Only want unique $field1 and was looking at the cookbook code, but for that I have to populate a hash and then re-inspect through before inserting uniques, something like : %ucnt = (); while

Re: Array with unique elements only

2004-05-21 Thread Mark Martin
Thanks Ramprasad - that works. At 17:29 20/05/2004 +0530, Ramprasad A Padmanabhan wrote: Wow, unique items is surely an FAQ. But here you dont need to filter the array, just see the answer inline On Thu, 2004-05-20 at 17:07, Mark Martin wrote: > Hi, > I'm moving database data from tab

no rows selected

2005-01-28 Thread Mark Martin
Hi, I'm running a test to see whether certain criteria in a SELECT statement return record or not. If I get a "no rows selected" from SQL then I want to perform a specific action . But I don't how perform the test for "no rows selected " ? $sql = qq{SELECT RECORD FROM TABLE WHERE FIELD = ? } ;

Different key in 2 hashes

2005-02-01 Thread Mark Martin
Hi, okay - straight out of the coobook : my @different = () foreach (keys %hash1) { delete $hash1{$_} unless exists $hash2$_}; push(@this_not_that,$_) unless exists $registered{$_}; } easy to remove the different key from hash one and record the removed item in @different. My question is how

RE: Different key in 2 hashes

2005-02-01 Thread Mark Martin
Thank you - worked a treat. At 09:00 01/02/2005 -0500, Bob Showalter wrote: Mark Martin wrote: > Hi, > okay - straight out of the coobook : > > my @different = () > foreach (keys %hash1) > { >delete $hash1{$_} unless exists $hash2$_}; >push(@this_not_that,$_) u

uninstalling module

2005-02-10 Thread Martin Mrazek
Hello, I have installed PDL module for perl, but something went wrong and I need to reinstall it. Shall I remove the module first and then install again? How to remove it? Martin -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <h

  1   2   3   4   5   >