Execute .bat file from perl?

2002-04-10 Thread Rob
New to this - need to execute a .bat file from a perl script. Any suggestions? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Location of SendMail

2002-04-10 Thread James Kelty
http://www.indigostar.com/sendmail.htm -James -Original Message- From: @fro @ndy [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 09, 2002 2:51 PM To: [EMAIL PROTECTED] Subject: Location of SendMail Hello, I am running Apache HTTP Server Version 1.3 on my Windows 2000 Professional PC w

Re: default value -simpler method?

2002-04-10 Thread p
Hi, Just out of interest, could you do it this way: my $default = "/foo/bar/blat"; print "File to use? [$default] "; chomp(my $question = || $default); I've just started using this sort of approach to assign default values to undefined/null parameters, eg: my $age = param('age') ||

passing a email address to sendmail

2002-04-10 Thread BDSOLMAIL
Hi, could someone help me?111 Iam trying to send a email with an open pipe, but i can not interpolate the '@' of the email address in the " To:" e.g. i have one variable $mymail = [EMAIL PROTECTED] the pipe open (MAIL, '/usr/bin/sendmail -oi -t) || or die bkkabakb; print MAIL << ENDMAIL; To: $

Execute .exe or .bat files from perl??

2002-04-10 Thread Rob
Anyone know how to call a .exe or .bat file from a perl script? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Regex!

2002-04-10 Thread James Taylor
There's a few problems with your script. This one works: $money = '$27.50'; $money =~ s/\$//; Use single quotes instead of double, and don't forget the =~ instead of = Daniel Falkenberg wrote: >Hi Tim, > >I just tried running $money = s/\$//: over > >$money = "$21.80"; > >And my returned resu

Re: Re: Checking if a hash has blank values.

2002-04-10 Thread p
Hi, What's the preferred waying of doing things... if ($var eq '') or if (defined $var) I assume they both mean pretty much the same thing? Tristan You Wrote: -- Hi Tanton, Yes, but what I really want it to do is go though all the values of the hash and if any of them contain nu

Réf. : Re: shrinking code

2002-04-10 Thread G . LE-HUU-HOA
What if $m != 0 at the beginning? Should it be something like : print "-" x (80 - $m); ? - Gilbert LE HUU HOA - -- Focal Systems "Tanton Gibbs"

Re: Checking if a hash has blank values.

2002-04-10 Thread Sudarsan Raghavan
[EMAIL PROTECTED] wrote: > Hi, > > What's the preferred waying of doing things... > > if ($var eq '') > > or > > if (defined $var) > > I assume they both mean pretty much the same thing? > No, defined is used to tell if the value is undef or not. undef is a special scalar value, it is tr

Re: passing a email address to sendmail

2002-04-10 Thread p
SL, There's a few problems with that there script, but to the point: try either: $mymail = '[EMAIL PROTECTED]'; or $mymail = "usr\@someplace.com"; The \ escapes the next character, ie treats it as a plain @ sign, not as the beginning of an array name. Using single quotes means that variables do

Re: default value -simpler method?

2002-04-10 Thread Elias Assmann
> my $age = param('age') || 12; > > Is that an acceptable way of doing things, or is there some > glaringly obvious mistake? It seems to pick up null and undefined > values okay, without any errors (i.e. no age param, or age= will > get 12). Only problem is that it treats 0 as null/undefined, bu

Perl on the Palm OS?

2002-04-10 Thread ryanb
I would like to write a program in perl which can be run on a Palm OS powered handheld. Any idea how I would go about doing this, or if it's even possible at this point in time? Thanks, Ryan

File Paths and file names

2002-04-10 Thread Green, Chris
I would like to write a perl program to run on NT to go through a list of files, with full path and extract just the file name. The path is random in length likewise so is the file name. Chris This e-mail (and any attachments) may contain privileged and/or confidential information. If you are

Net::FTP

2002-04-10 Thread OZGUR GENC
Hi All, I can not install any Net::FTP module from http://search.cpan.org/ . I can not uncompress any downloaded Net::FTP modules. Does anyone have any idea what problem can be? Ozgur *** This e-mail and any files trans

Re: Taint checking a bunch of word input

2002-04-10 Thread Brent Michalski
Well, I am guessing that you use some sort of whitespace between words, like a space. The below regex does not include the space character! Change your character set to include more characters.. From: [a-zA-Z0-9\.,;:] To: [a-zA-Z0-9\.,;: ] Or, to save a few chars.. [\w\.,;: ] Would be a sta

Re: File Paths and file names

2002-04-10 Thread Felix Geerinckx
on Wed, 10 Apr 2002 12:50:42 GMT, Chris Green wrote: > I would like to write a perl program to run on NT to go through a list > of files, with full path and extract just the file name. The path is > random in length likewise so is the file name. If you already have the list of files

Oracle sequences

2002-04-10 Thread stephen . redding
Hi all I'm attempting to load an oracle database and am struggling with how to retrieve a sequence for a table. in SQL, the value is net_seq.nextval how do i use this in a perl script?? Thanks Stephen Redding BT Ignite Solutions Telephone - 0113 237 3393 Fax - 0113 244 1413 Email - [EMAIL PR

Variable Interpolation

2002-04-10 Thread DBuitendag
Hi . Can you please help. When does Interpolation occur at Compile Time , Run Time or Both. So far I know on both, then why does the following not work. ( how can I get it to work ?) $scripts = 'cd $acu_home/bin \n nohup ${srv}_ss $srv.ini > $acu_home/bin/$srv.out&'; $acu_home = "/luke/u01/ap

Re: Perl on the Palm OS?

2002-04-10 Thread Elaine -HFB- Ashton
[EMAIL PROTECTED] [[EMAIL PROTECTED]] quoth: *>I would like to write a program in perl which can be run on a Palm OS *>powered handheld. Any idea how I would go about doing this, or if it's even *>possible at this point in time? http://www.cpan.org/ports/ PalmOS - no known ports So, no, it's no

simulating c structures in perl

2002-04-10 Thread Roy Peters
How would you define c type structures in perl? eg. struct { int a; int b; int c } STRUCT1; int STRUCT1 s; s.a =1; s.b =2; s.c =3; How would I write this in perl? Thanks. The information contained in this message may be privileged

Re: Net::FTP

2002-04-10 Thread Elaine -HFB- Ashton
OZGUR GENC [[EMAIL PROTECTED]] quoth: *> *>I can not install any Net::FTP module from http://search.cpan.org/ . I *>can not uncompress any downloaded Net::FTP modules. Does anyone have *>any idea what problem can be? Well, you have to uncompress them before you can install them. Check to make

RE: simulating c structures in perl

2002-04-10 Thread Nikola Janceski
Hmm... another question.. will this kinda of stuff be easier in Perl 6? > -Original Message- > From: Roy Peters [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, April 10, 2002 9:38 AM > To: [EMAIL PROTECTED] > Subject: simulating c structures in perl > > > How would you define c type stru

Re: simulating c structures in perl

2002-04-10 Thread walter valenti
Roy Peters wrote: >How would you define c type structures in perl? > >eg. > >struct { >int a; >int b; >int c >} STRUCT1; > >int STRUCT1 s; > >s.a =1; >s.b =2; >s.c =3; > >How would I write this in perl? > >Thanks. > $s{'a'}=1; $s{'b'}=2; $s{'c'}=3; Walter -- To unsubscribe, e-mail: [EMA

Re: simulating c structures in perl

2002-04-10 Thread Jonathan E. Paton
> How would you define c type structures in perl? perldoc Class::Struct if installed... else: > struct { > int a; > int b; > int c > } STRUCT1; > > int STRUCT1 s; my %struct = ( a => undef, b => undef, c => undef ); > s.a =1; > s.b =2; > s.c =3; $struct{a} = 1; $struct{b} = 2; $s

RE: simulating c structures in perl

2002-04-10 Thread Jonathan E. Paton
> Hmm... another question.. will this kinda of stuff be easier in Perl 6? Perhaps, need to browse the RFC list at: http://dev.perl.org/rfc to find out. Anything can change! Jonathan Paton __ Do You Yahoo!? Everything you'll ever need on one we

Re: simulating c structures in perl

2002-04-10 Thread Roy Peters
How do I simulate an array of structures in perl? eg. struct { int a; int b; int c } STRUCT1; int STRUCT1 s[5]; s[1].a =1; s[1].b =2; s[1].c =3; How would I write this in perl? Thanks. The information contained in this message may

Re: Variable Interpolation

2002-04-10 Thread Jenda Krynicky
From: [EMAIL PROTECTED] > Can you please help. > > When does Interpolation occur at Compile Time , Run Time or Both. So > far I know on both, then why does the following not work. ( how can I > get it to work ?) > > $scripts = 'cd $acu_home/bin \n nohup ${srv}_ss $srv.ini > > $

RE:Ip address

2002-04-10 Thread Jorge Goncalvez
Hi, I tried to get the IP address in a Win98 machine I made a perl module and I put it in /site/lib with .pm extension. it is Registry98.pm But I have this error: Can't call method Open of a undefined value at Registry98.pm line 22 Why? Thanks Registry98.pm Description: Registry98.pm -- T

Re: simulating c structures in perl

2002-04-10 Thread Jonathan E. Paton
> How do I simulate an array of structures in perl? my @array = \(%struct1, %struct2, %struct3); or something like that anyway. You learning or trying to convert C code into Perl? Compared to C, you don't use an array as often in Perl - but hashes. E.g. my %records = ( 'id0001' => {

Renaming a File

2002-04-10 Thread Allison Ogle
Hi, I am trying to open a file which has no file extension. (For example ABC ). What I want to do is rename the file with a file extension. (For example ABC.dat). Does anyone know how to do this? Thanks, Allison -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail:

Re: simulating c structures in perl

2002-04-10 Thread William.Ampeh
use Class::Struct; struct STRUCT1 => { a => '$',#a is a scalar b => '$', c => '$', }; $s = STRUCT1->new(); $s->a(1); $s->b(2); $s->c(3); # printf "\na = %d, b = %d c = %d\n\n", $s->a, $s->b, $s->c; __ William Ampeh (x3939) Federal Reserve Board --

Re: Taint checking a bunch of word input

2002-04-10 Thread zentara
On Wed, 10 Apr 2002 08:03:09 -0500, [EMAIL PROTECTED] (Brent Michalski) wrote: >Well, I am guessing that you use some sort of whitespace between words, >like a space. The below regex does not include the space character! > >Change your character set to include more characters.. > >From: >[a-zA-Z0

Re: Renaming a File

2002-04-10 Thread Craig Sharp
Allison, Try this script. I found it out on the net. My need was to rename a set of files but I don't see any reason that this couldn't rename a single file. #!/usr/local/bin/perl # # Usage: rename perlexpr [files] ($regexp = shift @ARGV) || die "Usage: rename perlexpr [filenames]\n"; if (

RE: Oracle sequences

2002-04-10 Thread David Kirol
my $sql = "SELECT net_seq.nextval FROM dual"; HTH -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 10, 2002 9:25 AM To: [EMAIL PROTECTED] Subject: Oracle sequences Hi all I'm attempting to load an oracle database and am struggling with how to

Re: Renaming a File

2002-04-10 Thread Felix Geerinckx
on Wed, 10 Apr 2002 14:05:48 GMT, Allison Ogle wrote: > What I want to do is rename the file with a file extension. ^^ perldoc -f rename -- felix -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Renaming a File

2002-04-10 Thread Craig Sharp
Allison, Here is the link for more information on the script. http://www.evolt.org/article/Renaming_Files_with_Perl/17/351/ Craig A. Sharp Unix Systems Administrator DNS Administrator Roush Industries Office: 734-466-6286 Cell: 734-231-6769 Fax: 734-466-6939 [EMAIL PROTECTED] ==

Re: Renaming a File

2002-04-10 Thread Michael Stidham
Try : perldoc -f rename HTH - Mike >From: "Allison Ogle" <[EMAIL PROTECTED]> >To: "a a" <[EMAIL PROTECTED]> >Subject: Renaming a File >Date: Wed, 10 Apr 2002 10:05:48 -0400 > >Hi, > >I am trying to open a file which has no file extension. (For example ABC >). >What I want to do is rename the

RE: Execute .exe or .bat files from perl??

2002-04-10 Thread Najamuddin, Junaid
This might help you # looks for the existence of batch or exe files then logs it in a log file or if do not # find it exits and then thru system command execute it you can also alter it to get email or page if you want to do so use win32; if (-e "$batch) {print LOG "$batch exist";

Re: use of package in a script

2002-04-10 Thread Jenda Krynicky
From: drieux <[EMAIL PROTECTED]> > Unless someone can come up with a really HOT idea as to why one > would want to put a 'package declaration' in an application - and I > have tried, but for the life of me, can not come up with a good reason > to go there... the simple rule of th

RE: Renaming a File

2002-04-10 Thread Timothy Johnson
You can use the rename() function. $file = "ABC"; rename($file, $file."dat") || die "Could not rename file!\n"; I think that's how you use it. I can't test it here. Look it up in perlfunc if it doesn't work. perldoc -f rename -Original Message- From: Allison Ogle To: a a Sent: 4/10/

RE: Execute .exe or .bat files from perl??

2002-04-10 Thread Timothy Johnson
If you want to store the output in a variable then use backticks. my $var = `echo This is my output.`; or you can use system, which just returns the return value of the command: my $returnvalue = system('ping -a 10.0.0.1'); -Original Message- From: Rob To: [EMAIL PROTECTED] Sent: 4/

Re: Validating form date

2002-04-10 Thread Ron
Hello Daniel Here is one approach I use to validate an email address. if ($email_new !~ /[\w\-]+\@[\w\-]+\.[\w\-]+/) { # Not a valid email address - Do this }else # Valid email address - Do this } Ron == "Daniel Falkenberg" <[EMAIL PROTECTED]> wrote in me

Regex, Taint, Review

2002-04-10 Thread K.L. Hayes
Hello All, I have a script to process an inquiry form.(go figure ;) Anyway, if someone could take a quick look and see if I'm missing anything obvious or see anything that would allow a breach in security, I would appreciate it. Particularly my regex filters may need a third eye to catch someth

Re: Variable question

2002-04-10 Thread Randal L. Schwartz
> "Bob" == Bob Ackerman <[EMAIL PROTECTED]> writes: >> At no point do you have an "array" in a scalar context, or a "list" >> in a scalar context. Really. You don't. Ever. Get it? >> >> And why I'm harping on this is that I've seen this myth continue to >> perpetuate, started from some b

Re: use of package in a script

2002-04-10 Thread drieux
On Wednesday, April 10, 2002, at 07:27 , Jenda Krynicky wrote: > From: drieux <[EMAIL PROTECTED]> [..] >> if the package assertion makes sense here >> then this should be a Module >>hence start with h2xs > > Well ... imagine you need some custom class of objects in your >

need help in others programming..

2002-04-10 Thread senrong
Do anyone know where can I get help on Assembly programming language on the net?...esp. in ANS? thanks -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: use of package in a script

2002-04-10 Thread drieux
Jenda, On Wednesday, April 10, 2002, at 07:27 , Jenda Krynicky wrote: > From: drieux <[EMAIL PROTECTED]> >> Unless someone can come up with a really HOT idea as to why one >> would want to put a 'package declaration' in an application - [..] >> if the package assertion makes sen

Re: Variables and Modules

2002-04-10 Thread drieux
On Monday, April 8, 2002, at 11:56 , Kevin Old wrote: > Hello all, > > Quick question about variables. I am editing a few scripts written by > another programmer and he programs every variable surrounded in brackets, > like ${var_name}. > > Is there any advantage to this? in it's self this is

Re: use of package in a script

2002-04-10 Thread Jenda Krynicky
From: drieux <[EMAIL PROTECTED]> > On Wednesday, April 10, 2002, at 07:27 , Jenda Krynicky wrote: > > > From: drieux <[EMAIL PROTECTED]> > [..] > >> if the package assertion makes sense here > >> then this should be a Module > >>hence start with h2xs > > > > Well ... imagine

RE: Ip address

2002-04-10 Thread Smith, Jim R
Where does Open (upcase O) come from. Did you mean to use open (lowcase o) ? -Original Message- From: Jorge Goncalvez [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 10, 2002 9:58 AM To: [EMAIL PROTECTED] Subject: RE:Ip address Hi, I tried to get the IP address in a Win98 machine I m

Re: RE:Ip address

2002-04-10 Thread Connie Chan
>From your attachement, it seems that you are refering to some other Modules, perhapes "File". but you didn't use or require it in your script.. so it becomes an unknown method.. Besides, I don't know if the following are true or not : 1) "die" is no use in Win32 platform. 2) you skipped Expo

displaying images

2002-04-10 Thread Jerry Preston
I can display an image using pure HTML: But I cannot do it in perl. I have tried the following: $server='http://my.com'; print "\n"; print ""; print" What I am I doing wrong? Thanks, Jerry -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-m

RE: Execute .bat file from perl?

2002-04-10 Thread David Gray
> New to this - need to execute a .bat file from a perl script. > > Any suggestions? Look into the system command: perldoc -f system Hope that helps, -dave -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: displaying images

2002-04-10 Thread Connie Chan
> I can display an image using pure HTML: > > First, this is wrong HTML, you should write as > print" > > > You should give a \ for %, that is 80\%. If no vars and aposophy are inside a print, you can use single quote pair, so you can write everything without using \ for escape

RE: default value

2002-04-10 Thread David Gray
> $question = $default if $question eq ''; You could possibly shorten this last line to: $question ||= $default; This will set $question to $default if $question logically evaluates to false (which includes the case where $question is the empty string). If you only want to reset $question whe

RE: default value

2002-04-10 Thread Jeff 'japhy' Pinyan
On Apr 10, David Gray said: >> $question = $default if $question eq ''; > >You could possibly shorten this last line to: > >$question ||= $default; > >This will set $question to $default if $question logically evaluates to >false (which includes the case where $question is the empty string). If

(-e $filename) gives Use of uninitialized value at...

2002-04-10 Thread Ahmed Moustafa
I'm using (-e $filename) to check the existence of $filename. If the file exists, it returns true, otherwise it gives 'Use of uninitialized value at...line #' (# is the line number of the if statement -if ($filename)-. Why does that happen and how I can fix it, please? Thanks in advance. --Ahmed

RE: displaying images

2002-04-10 Thread Charlton, Mark
In XHTML 1.0 quotes around parameters are compulsary. You can skip the quotes, but it is not valid XHTML code. Therefore I feel it is better practice to always use quotes where possible to maintain standards compatability. It also helps the browsers interpretation of the code, and IMHO makes th

Re: (-e $filename) gives Use of uninitialized value at...

2002-04-10 Thread Agustin Rivera
Seems like the method you use to assign filename doesn't always occur. Maybe you have the my $filename='whatever' in an if statement? Agustin Rivera Webmaster, Pollstar.com http://www.pollstar.com - Original Message - From: "Ahmed Moustafa" <[EMAIL PROTECTED]> To: "Perl" <[EMAIL PROTEC

Keeping places with numbers

2002-04-10 Thread Michael Gargiullo
I have a loop that starts at 0 and goes to 9 and sets the variable $zip to the current number I need it to always be 5 places like a zip code, like so 0 1 etc... How can I do that? -Mike -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECT

RE: (-e $filename) gives Use of uninitialized value at...

2002-04-10 Thread Nikola Janceski
Assuming you have all warnings on, via -w or use warnings, I don't think $filename is losing scope, unless he uses it else where. The warning is good, it's telling you that $filename = "" at that point in your script. So either you lost the contents of $filename somewhere, or lost scope of the $

RE: Keeping places with numbers

2002-04-10 Thread Nikola Janceski
perldoc -f sprintf $zip = sprintf("%05d", $zip); > -Original Message- > From: Michael Gargiullo [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, April 10, 2002 1:16 PM > To: Beginners > Subject: Keeping places with numbers > > > I have a loop that starts at 0 and goes to 9 and sets t

Re: Keeping places with numbers

2002-04-10 Thread Jeff 'japhy' Pinyan
On Apr 10, Michael Gargiullo said: >I have a loop that starts at 0 and goes to 9 and sets the variable $zip >to the current number > >I need it to always be 5 places like a zip code, like so > >0 >1 >etc... > >How can I do that? Here are two ways: # makes a VERY LARGE LIST for $

RE: displaying images

2002-04-10 Thread Charlton, Mark
With actual reference to the initial question this time, I forgot it in my previous post... What is the resultant output when you execute the command in the browser? Regards -Original Message- From: Charlton, Mark [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 10, 2002 6:07 PM To: 'C

why wont html templates work with perl ???

2002-04-10 Thread A Taylor
I have been trying (and trying) to use the code below as I need to use HTML templates in perl, and I keep getting the same error. Can't locate HTML/Template.pm in @INC (@INC contains: /usr/lib/perl5/5.00503/i386-linux /usr/lib/perl5/5.00503 /usr/lib/perl5/site_perl/5.005/i386-linux /usr/lib/pe

Re: rewrite without using two functions?

2002-04-10 Thread Randal L. Schwartz
> "David" == David Gray <[EMAIL PROTECTED]> writes: David> When you have David> LIST2 = map { m!^(.*)/\*$! } LIST1 David> It's shorthand for a loop like: David> foreach my $el (@LIST1) { David> if($el =~ m!^(.*?)/\*$!) { David> push @LIST2,$1 David> } else { David> push @LIST2,

RE: why wont html templates work with perl ???

2002-04-10 Thread Hanson, Robert
It probably means that they don't have it installed. You can create your own library directory by putting the files in a directory and adding that directory to your library path (i.e. @INC). See the lib pragma docs on how to add a library path. http://www.perldoc.com/perl5.6.1/lib/lib.html Rob

Re: why wont html templates work with perl ???

2002-04-10 Thread Elaine -HFB- Ashton
A Taylor [[EMAIL PROTECTED]] quoth: *>I have been trying (and trying) to use the code below as I need to use HTML *>templates in perl, and I keep getting the same error. *> *>Can't locate HTML/Template.pm in @INC (@INC contains: *>/usr/lib/perl5/5.00503/i386-linux /usr/lib/perl5/5.00503 *>/usr/

Re: (-e $filename) gives Use of uninitialized value at...

2002-04-10 Thread Ahmed Moustafa
What is the default scope for a variable defined inside a subroutine? - Original Message - From: "Nikola Janceski" To: "'Agustin Rivera'"; "Ahmed Moustafa"; <[EMAIL PROTECTED]> Sent: Wednesday, April 10, 2002 10:19 AM Subject: RE: (-e $filename) gives Use of uninitialized value at... >

Re: (-e $filename) gives Use of uninitialized value at...

2002-04-10 Thread Jeff 'japhy' Pinyan
On Apr 10, Ahmed Moustafa said: >What is the default scope for a variable defined inside a subroutine? The default scope for ALL variables is to the package they belong to. If you declare a variable with 'my', or give it a fully qualified package name (like $Foo::x), then the default is not the

Re: extra space

2002-04-10 Thread Bryan R Harris
Please forgive my ignorance, but I can't figure out what this is doing. This routine correctly sorts @lines (array of lines with tab delimited fields) by column 4. # Step 3 - assumes columns 3 and 4 contain numeric data my @sorted = map { $_->[2] } sort { $a->[0] <=> $b->[0] || $a-

RE: File Paths and file names

2002-04-10 Thread David Gray
> I would like to write a perl program to run on NT to go > through a list of files, with full path and extract just the > file name. The path is random in length likewise so is the file name. You could use a regular expression like: $filename =~ s/[\\\/]([^\\\/])$/$1/; To replace the full pa

Re: (-e $filename) gives Use of uninitialized value at...

2002-04-10 Thread Ahmed Moustafa
I put a print statement, just before the (-e $filename) line, to print the $filename. It printed the $filename successfully and didn't give the 'uninitialized' warning for the print line. - Original Message - From: "Nikola Janceski" <[EMAIL PROTECTED]> To: "'Agustin Rivera'" <[EMAIL PROTE

Re: (-e $filename) gives Use of uninitialized value at...

2002-04-10 Thread Jenda Krynicky
From:"Ahmed Moustafa" <[EMAIL PROTECTED]> > What is the default scope for a variable defined inside a subroutine? The scope os a lexical variable is always to the end of the enclosing block or eval()ed string or the file. The body of a subroutine is just a block as far as scoping is concerned

Scope of my() declared variables WAS( Re: -e $filename...)

2002-04-10 Thread Timothy Johnson
Here's the part I still don't understand, and maybe some of you can show me the light. What is the difference between local() and my()? I have never used local(), the only examples I've ever been given involve scoping $_, and if I am ever tempted to do that, I can usually trace it back to a bad

RE: extra space

2002-04-10 Thread Hanson, Robert
> I can't figure out what this is doing... > my @sorted = map { $_->[2] } > sort { $a->[0] <=> $b->[0] || $a->[1] <=> $b->[1] } > map { [ (split /\t/)[3,2], $_ ] } > @lines; Hmmm... let's see. > @lines; 1. Iterate over @lines > map { [ (split /\t/)[3,2]

RE: Oracle sequences

2002-04-10 Thread David Gray
> I'm attempting to load an oracle database and am struggling > with how to retrieve a sequence for a table. > > in SQL, the value is net_seq.nextval > how do i use this in a perl script?? Do you have DBI installed? What have you tried? Can we see some code? AFAIK, you can't directly retrieve

RE: Scope of my() declared variables WAS( Re: -e $filename...)

2002-04-10 Thread David Gray
> Here's the part I still don't understand, and maybe some of > you can show me the light. What is the difference between > local() and my()? I have never used local(), the only > examples I've ever been given involve scoping $_, and if I am > ever tempted to do that, I can usually trace it

Re: displaying images

2002-04-10 Thread Jerry Preston
Mark, The result is NOT FOUND. I have made the changes and I still get NOT FOUND. Jerry "Charlton, Mark" wrote: > With actual reference to the initial question this time, I forgot it in my > previous post... > > What is the resultant output when you execute the command in the browser? > > Re

RE: use of package in a script

2002-04-10 Thread David Gray
> Unless someone can come up with a really HOT idea as to why > one would want to put a 'package declaration' in an > application - and I have tried, but for the life of me, can > not come up with a good reason to go there... How about as a mnemonic device, or to sort variables by category? Co

Re: problem sending mail

2002-04-10 Thread fliptop
t3tsu0 wrote: > Where: > > $mail_prog= '/usr/bin/sendmail'; > > > sub send_mail { > local($from,$to_name,$to_addr,$subject,$content) = @_; > open(MAIL,"|$mail_prog -t") || &error("unable to send mail to: > $to_name - $to_addr"); > print MAIL "From: $to_name ",'<',"$

I have numbers in an array how do extract them in a random order ?

2002-04-10 Thread FLAHERTY, JIM-CONT
I have numbers in an array how do extract them in a random order ? . I want to feed them to a sql query to extract information , just the first 10 of them code ## $dbh =DBI ->connect($data_source, $username, $password) or die "cant connec

Re: I have numbers in an array how do extract them in a random order ?

2002-04-10 Thread Felix Geerinckx
on Wed, 10 Apr 2002 19:21:11 GMT, Jim-Cont Flaherty wrote: > I have numbers in an array how do extract them in a random order ? . > I want to feed them to a sql query to extract information , just the > first 10 of them This is a frequently asked question: perldoc -q random

URL file question

2002-04-10 Thread Olson, Wade
Hi, What is the best way to read the contents of a file out the Internet? Example: get the text from http://mycompany.com/index.html and put into string, array, redirect, etc? TIA! Wade -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

precedence

2002-04-10 Thread Nikola Janceski
Hey all, This has always pestered me. I have the following list printed out and taped to the wall in my cubical. I got it from the top of 'perldoc perlop' and have a few questions. What does the (left/right/nonassoc) mean? What are examples of 'terms and list operators (leftward)'? What are ex

Re: URL file question

2002-04-10 Thread Felix Geerinckx
on Wed, 10 Apr 2002 19:33:43 GMT, Wade Olson wrote: > What is the best way to read the contents of a file out the Internet? > > Example: get the text from http://mycompany.com/index.html and put into use LWP::Simple; $text = get($url); -- felix -- To unsubscribe, e-mail: [EM

HELP needed with printing to a text file

2002-04-10 Thread @fro @ndy
Hi, Once again i have another problem regarding my message board lol. This time the message board is fine but i have made an admin so that it will read the contents of a text file where all the entries are printed to and display them into a so that i can easily remove/change messages. Below is

Re: rewrite without using two functions?

2002-04-10 Thread Randal L. Schwartz
> "Nikola" == Nikola Janceski <[EMAIL PROTECTED]> writes: Nikola> Thanx... didn't know that it was an empty list... I thought it was '' Ahh, but in a scalar context, it is! Isn't context wonderful? :) *This* would push alternating 1's and ""'s to the list: @output = map { scalar /(foo)bar

Re: Renaming a File

2002-04-10 Thread Paul Johnson
On Wed, Apr 10, 2002 at 10:11:28AM -0400, Craig Sharp wrote: > Allison, > > Try this script. I found it out on the net. My need was to rename a > set of files but I don't see any reason that this couldn't rename a > single file. > > #!/usr/local/bin/perl > # > # Usage: rename perlexpr [files]

Re: HELP needed with printing to a text file

2002-04-10 Thread bob ackerman
On Wednesday, April 10, 2002, at 01:34 PM, @fro @ndy wrote: > Hi, > Once again i have another problem regarding my message board lol. This > time the message board is fine but i have made an admin so that it will > read the contents of a text file where all the entries are printed to and > d

Re: Scope of my() declared variables WAS( Re: -e $filename...)

2002-04-10 Thread Elaine -HFB- Ashton
Timothy Johnson [[EMAIL PROTECTED]] quoth: *> *>Here's the part I still don't understand, and maybe some of you can show me *>the light. What is the difference between local() and my()? I have never *>used local(), the only examples I've ever been given involve scoping $_, and *>if I am ever tem

cdburner module? - 2 parts

2002-04-10 Thread Michael Gargiullo
Is there a way to figure out if there is a cd burner installed on a system? Is there a cd burning module written already out there? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Printing output to an Existing HTML file

2002-04-10 Thread Kojo Idrissa
Jenda, Thanks for the response. I've been too busy to try it, but I plan to soon. I'll let you and the list know how it works out. Thanks, At 12:32 AM 4/4/2002 +0200, Jenda Krynicky wrote: >From: Kojo Idrissa <[EMAIL PROTECTED]> > > This is probably a simple question, but I

Re: Opening another script and changing variables

2002-04-10 Thread drieux
On Tuesday, April 9, 2002, at 01:04 , Nikola Janceski wrote: > If I knew then what I know now.. I would have setup a file that contained > these variable values and never touch the cgi script. Then the rest of the > script would just copy some files into directory and setup a webpage to > link

Re: Validating form date

2002-04-10 Thread fliptop
Daniel Falkenberg wrote: > I am just playing around with forms at the moment. What I want to do is > have user enter data into form fiels then I want to validate that > entered date. So far I can do things as basic as validating if fields > contain characters and so forth. But what I want to d

problem sending mail

2002-04-10 Thread Aman Raheja
Hi all I am trying to send a mail with the following code and the last print statement doesn't print, ie, the mail is not sent. This code is called on submitting a form on the web open(MAIL, "/usr/sbin/sendmail -oi -t") || die "Can't open mail"; print MAIL <"; ---

Re: problem sending mail

2002-04-10 Thread Aman Raheja
It didn't work either way as suggested using -t only or changing the delimiting tag with print statetent I tried to do the same on the command line and it works. I wonder what is missing here. Help is greatly appreciated Aman >From: "Aman Raheja" <[EMAIL PROTECTED]> >To: [EMAIL PROTECTED], [EM

Re: problem sending mail

2002-04-10 Thread Elaine -HFB- Ashton
Aman Raheja [[EMAIL PROTECTED]] quoth: *>Hi all *>I am trying to send a mail with the following code and the last print *>statement doesn't print, ie, the mail is not sent. *>This code is called on submitting a form on the web *> *>open(MAIL, "/usr/sbin/sendmail -oi -t") || di

RE: problem sending mail

2002-04-10 Thread t3tsu0
This is a function I've used in the past that works. tet Where: $mail_prog= '/usr/bin/sendmail'; sub send_mail { local($from,$to_name,$to_addr,$subject,$content) = @_; open(MAIL,"|$mail_prog -t") || &error("unable to send mail to: $to_name - $to_addr"); print MAIL

Re: problem sending mail

2002-04-10 Thread Ask Bjoern Hansen
[EMAIL PROTECTED] (T3tsu0) writes: > sub send_mail { > open(MAIL,"|$mail_prog -t") || &error("unable to send mail to: > $to_name - $to_addr"); [...] > close(MAIL); you really want to put error checking on the close() too. In many cases you won't be told until then if the open fa

  1   2   >