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]
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
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') ||
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: $
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]
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
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
What if $m != 0 at the beginning? Should it be something like :
print "-" x (80 - $m);
?
- Gilbert LE HUU HOA -
--
Focal Systems
"Tanton Gibbs"
[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
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
> 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
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
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
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
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
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
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
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
[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
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
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
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
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
> 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
> 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
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
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 >
> $
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
> 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' => {
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:
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
--
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
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 (
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
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]
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]
==
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
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";
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
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/
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/
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
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
> "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
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
>
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]
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
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
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
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
>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
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
> 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]
> 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
> $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
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
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
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
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
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
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 $
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
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 $
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
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
> "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,
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
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/
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...
>
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
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-
> 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
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
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
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
> 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]
> 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
> 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
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
> 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
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 ? . 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
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
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]
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
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
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
> "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
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]
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
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
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]
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
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
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
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 <";
---
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
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
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
[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
100 matches
Mail list logo