this is part of the contents for test.pl
$REQUIRE_DIR="c:\\taform\\cgi-bin\\";
push(@INC,$REQUIRE_DIR) if $REQUIRE_DIR;
require 'test2.pl';
sub1();
and so on . . .
this is part of the contents for test.pl
sub sub1 {
print "firstvar=$firstvar";
print "secondvar=$secondvar";
my($firstvar)=1;
local($secondvar)=2;
print "firstvar=$firstvar";
print "secondvar=$secondvar";
}
basically what i want to try out is the scope of variables using 'my'
and 'local' and whether they behave the same when the subroutine is in
the same program and when the subroutines are in separate files( which
will then require us to use -> require 'filename'; )
The problem is when the program reaches line 3 of test.pl the following
mess. appears :-
test2.pl did not return a true value at test.pl line3. <IN> chunk 3
and the program stops.
i have make sure that path is correct and i had even omit the value of
$REQUIRE_DIR since both of the file is in the same dir.
thanks in advance.
______________________________________________________
____________________________________________________________________
List Site: http://www.findmail.com/list/perl-beginner/
To unsubscribe, send to perl-beginner-unsubscribe@...
FREE group e-mail lists at http://www.findmail.com
On Thu, 27 Aug 1998 13:29:22 +0100, HaraldWolf@... (Harald Wolf) wrote:
>what is POD ? Which (Win32)-Application do i have to use if i want to
>read POD-Files ???
POD: "plain old documentation". It's a means of bundling module documentation
in the source code (where it stands some chance of getting updated whenever the
code does!). You can view this documentation with 'perldoc'. For starters, try:
$ perldoc perldoc
If your O/S complains about 'perldoc' missing, then you may have to hunt for
'perldoc' wherever you keep 'perl'.
When you've digested that, try:
$ perldoc perlpod
--
~~~~~~~~~~~~~~~~|Fare Thee well now, let your
Jeffery Boes |life proceed by its own design.
jboes@... |Nothing to tell now, let your
UIN 3394914 |words be yours, I'm done with mine...
____________________________________________________________
List Site: http://www.findmail.com/list/perl-beginner/
To unsubscribe, send to perl-beginner-unsubscribe@...
FREE group e-mail lists at http://www.findmail.com
>Hi,there. I need your help. I am using perl to wirte a cgi scripts. I
>need to insert a string into a data file called data.html . Suppose a
>tag <!--insert string here-->is embeded in data.html. I want a string
>insert after this tag. What if this data file is not exist before but
>how it can be created from a template file such as template.html?
>It is concluded that I want my scripts to :
>1.Create a new file from a template;
>2.Insert a string into somewhere in this newly created file;
This quickly (and probably badly) written piece of code below will do what
you want. It will check to see if data.html exists, if it does, we work
with it, otherwise we work with the template file.
It pre-loads the entire file into an array, checking each line as we go to
see if we have a match on our search string. If we do then we replace it
with the new string.
The routine can be improved but I've kept it simple to demonstrate.
#!/usr/bin/perl
$searchstring = "<!--insert string here-->";
$newstring = "whatever string you want to insert";
$docpath = "/usr/httpd/htdocs/";
if (!-e "$docpath/data.html") {
open(FILE,"$docpath/template.html");
} else {
open(FILE,"$docpath/data.html");
}
while (<FILE>) {
if (/$searchstring/i) {
s/$searchstring/$newstring/oi;
}
push @lines,$_;
}
close(FILE);
open(NEWFILE,">$docpath/data.html");
print NEWFILE @lines;
close(NEWFILE);
--
Dave Dustin
"Forgive and Remember"
____________________________________________________________
List Site: http://www.findmail.com/list/perl-beginner/
To unsubscribe, send to perl-beginner-unsubscribe@...
FREE group e-mail lists at http://www.findmail.com
Hi,there. I need your help. I am using perl to wirte a cgi scripts. I
need to insert a string into a data file called data.html . Suppose a
tag <!--insert string here-->is embeded in data.html . I want a string
insert after this tag. What if this data file is not exist before but
how it can be created from a template file such as template.html?
It is concluded that I want my scripts to :
1.Create a new file from a template;
2.Insert a string into somewhere in this newly created file;
Thanks a lot.
Xiaoxiong Zhu
Shanghai,China
____________________________________________________________
List Site: http://www.findmail.com/list/perl-beginner/
To unsubscribe, send to perl-beginner-unsubscribe@...
FREE group e-mail lists at http://www.findmail.com
On Sun, 23 Aug 1998 17:26:17 -0500, hdesign <hdesign@...> wrote:
>$_='My email address is <<<web@...>.';
>print "$_ \n";
>print "Match worked :$1:\n" if /(<*>)/i;
Here's what you want:
$_='My email address is <<<web@...>.';
print "$_ \n";
print "Match worked :$1:\n" if /<([^<]*)>/i;
Broken down:
< - matches a literal '<'
() - contains the pattern returned in $1
[]* - defines a class of characters matched as a string
^< - matches anything BUT a '<'
So the pattern says "Match '<', then zero or more characters which aren't a '<',
and finally a '>'."
--
~~~~~~~~~~~~~~~~|Fare Thee well now, let your
Jeffery Boes |life proceed by its own design.
jboes@... |Nothing to tell now, let your
UIN 3394914 |words be yours, I'm done with mine...
____________________________________________________________
List Site: http://www.findmail.com/list/perl-beginner/
To unsubscribe, send to perl-beginner-unsubscribe@...
FREE group e-mail lists at http://www.findmail.com
I've been trying to figure out what is going on here:
the first example returns > only
$_='My email address is <<<web@...>.';
print "$_ \n";
print "Match worked :$1:\n" if /(<*>)/i;
and this example returns <<<<>
$_='My email address is <web@...<<<<>.';
print "$_ \n";
print "Match 3 worked :$1:\n" if /(<*>)/i;
with the regex <*> I understand it as meaning, matching <, then * zero or
more of the previous characters. I don't see why the first example would
not return <<> instead of just >.
If someone could shed some light on this, I would greatly appreciate it.
Thanks in advance
____________________________________________________________
List Site: http://www.findmail.com/list/perl-beginner/
To unsubscribe, send to perl-beginner-unsubscribe@...
FREE group e-mail lists at http://www.findmail.com
Help needed. I need to check a field to see whether it is empty. If it
is not, need to check again if it contains only spaces. The empty part
is easy, but how to check for spaces only?
Thanks in advance
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
____________________________________________________________
List Site: http://www.findmail.com/list/perl-beginner/
To unsubscribe, send to perl-beginner-unsubscribe@...
FREE group e-mail lists at http://www.findmail.com
Hi!
I'm trying to make this regex work like I want it to.
This is as close I've come so far.
while ($form{msg} =~ m/\b\S{41,}?\b/)
{
$form{msg} =~ s/\b(\S{40})(\S+?)\b/$1 $2/;
}
This does what I want it to but only with letters and numbers.
I want it to match any 'words' no mather what charcters except space
and \n. Please be gentle..I'm only on page 30 in my Owl ;)
Martin
----
Read this list on the Web at http://www.makelist.com/list/perl-beginner/
To unsubscribe, email to perl-beginner-unsubscribe@...
To subscribe, email to perl-beginner-subscribe@...
--
Start a FREE E-Mail List at http://www.makelist.com !
At 05:15 PM 8/10/98 -0000, you wrote:
>Please,
>> How can I do to run a Perl CGI script from my browser (by example,
>> Netscape) in Windows 95. I have Perl for Win32 v5.0003_7 on my PC.
>>
>> Thank you in advanced.
>>
>>
>
>Do you have server software on your local computer?
>If not the following will apply.
>If I am tryng to test my perl programs on my local computer, I have to go
thru my local server (not the remote). I think I remember getting a free
copy of Microsoft's "Personal Server" that came on the CD included in back
of one of my perl books. I use Website Pro but I think Microsoft puts one
out free. What happens is the URL that you type in will look similar to
http://localhost/directory_name/file.htm
>Where file.htm is the HTML page that the form is on. If you have your
server software going, the browser will "talk" to the server software and
"do the script". If you have an error in your script, your browser will
come back with possible reasons why it errored.
If you are just testing scripts, it might be best to stay away from
Microsoft's personal webserver. It's pretty clunky and a little overpowered
for that use.
Instead, try Omnihttpd, available at pretty much any large shareware site
(www.shareware.com works) or at http://www.omnicron.ab.ca/httpd/
Super-easy to install, very configurable, but not overpowering and not a
memory hog.
Greg
Integrity is not a conditional word. It doesn't blow
in the wind or change with the weather. It is your
inner image of yourself, and if you look in there and
see a man who won't cheat, then you know he never will.
-John D. MacDonald
_The Turquoise Lament_
gwebster@...
----
Read this list on the Web at http://www.makelist.com/list/perl-beginner/
To unsubscribe, email to perl-beginner-unsubscribe@...
To subscribe, email to perl-beginner-subscribe@...
--
Start a FREE E-Mail List at http://www.makelist.com !
Please,
> How can I do to run a Perl CGI script from my browser (by example,
> Netscape) in Windows 95. I have Perl for Win32 v5.0003_7 on my PC.
>
> Thank you in advanced.
>
>
Do you have server software on your local computer?
If not the following will apply.
If I am tryng to test my perl programs on my local computer, I have to go thru
my local server (not the remote). I think I remember getting a free copy of
Microsoft's "Personal Server" that came on the CD included in back of one of my
perl books. I use Website Pro but I think Microsoft puts one out free. What
happens is the URL that you type in will look similar to
http://localhost/directory_name/file.htm
Where file.htm is the HTML page that the form is on. If you have your server
software going, the browser will "talk" to the server software and "do the
script". If you have an error in your script, your browser will come back with
possible reasons why it errored.
-----
Original Message: http://www.findmail.com/list/perl-beginner/?start=18
Start a FREE email list at http://www.FindMail.com/
----
Read this list on the Web at http://www.makelist.com/list/perl-beginner/
To unsubscribe, email to perl-beginner-unsubscribe@...
To subscribe, email to perl-beginner-subscribe@...
--
Start a FREE E-Mail List at http://www.makelist.com !
But I would like to add a screen that takes in Credit Card info. I would
need to include fields other than "textfields". I can't seem to get the
submit button to include or acknowledge my new fields. Do I really have to
send it to another script?
Seems like there should be a way to include another screen for something
other than straight text boxes.
I'm trying to include drop down and radio buttons.
Anyone have ideas???
Thanks
sheila
Not sure I understand completely...a credit card number is just
digits...and therefore would be fine in a text field...or are you looking
for "type" of credit card (Amex Mastercard, Visa) in a dropbox?
Either way, some clarification would be good.
Thanks,
Greg
Eng: I think that Elvis is still alive.
Latin: Credo Elvem ipsum etian vivere.
gwebster@...
----
Read this list on the Web at http://www.makelist.com/list/perl-beginner/
To unsubscribe, email to perl-beginner-unsubscribe@...
To subscribe, email to perl-beginner-subscribe@...
--
Start a FREE E-Mail List at http://www.makelist.com !
I like it because it allows a form to have different screens and saves the state even though it moves to another screen. I like the idea of being able to break down the info your asking for in steps rather than a page a mile long with many lines of input. (hope that made sense)
Anyway, unless I'm missing something, I don't see where you can save the data to a file. I tried inserting simple code to save the data to a file :
That does write the names and values to a text file.
(It prints out the variable name followed by a dash and then the value)
But I would like to add a screen that takes in Credit Card info. I would need to include fields other than "textfields". I can't seem to get the submit button to include or acknowledge my new fields. Do I really have to send it to another script?
Seems like there should be a way to include another screen for something other than straight text boxes.
I'm trying to include drop down and radio buttons.
At 05:22 PM 8/5/98 -0700, you wrote:
>Here in the lush Irvine Silicon Valley of Southern California, there is
>still not a single JC , or even the local university for that matter, that
>teaches a course specifically for Perl programming, albeit the fact that
>Javascript, Java, web design, etc. is offered everywhere.
>Does anyone in any other part of the country know if there is a Perl
>course taught at a community college, or at a 4 year school. Just wondered
>why this aspect of computer science has been in the 'underground' for this
>long.
I think that other than a minor segment in a Unix course at the local U
here in Vancouver, there is nothing else local.
I'm hoping to build a website with exercises available for free, so if you
have any that are not copywritten (not from a book), please feel free to
submit them.
Greg Webster
Integrity is not a conditional word. It doesn't blow
in the wind or change with the weather. It is your
inner image of yourself, and if you look in there and
see a man who won't cheat, then you know he never will.
-John D. MacDonald
_The Turquoise Lament_
gwebster@...
----
Read this list on the Web at http://www.makelist.com/list/perl-beginner/
To unsubscribe, email to perl-beginner-unsubscribe@...
To subscribe, email to perl-beginner-subscribe@...
--
Start a FREE E-Mail List at http://www.makelist.com !
yeap, help is needed here. Currently I am doing a project where I need
to put up a form into the local intranet so that everyone could access
it everywhere in the plant. Now, as usual a form need to be design using
html with the relevant cgi scripts to perform the processes. The problem
is these form need to be stored in the database ( they are using sybase
). Can anyone direct me to any sites that provide tutorial on
interfacing ( querying, adding records, updating, etc )between cgi
scripts and sybase?
thanks a million.
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
----
Read this list on the Web at http://www.makelist.com/list/perl-beginner/
To unsubscribe, email to perl-beginner-unsubscribe@...
To subscribe, email to perl-beginner-subscribe@...
--
Start a FREE E-Mail List at http://www.makelist.com !
Here in the lush Irvine Silicon Valley of Southern California, there is
still not a single JC , or even the local university for that matter, that
teaches a course specifically for Perl programming, albeit the fact that
Javascript, Java, web design, etc. is offered everywhere.
Does anyone in any other part of the country know if there is a Perl
course taught at a community college, or at a 4 year school. Just wondered
why this aspect of computer science has been in the 'underground' for this
long.
Best regards
Roland Gregory
Web programming mgr
Innovative Dimensions Online- Full service internet company
info@...
----
Read this list on the Web at http://www.makelist.com/list/perl-beginner/
To unsubscribe, email to perl-beginner-unsubscribe@...
To subscribe, email to perl-beginner-subscribe@...
--
Start a FREE E-Mail List at http://www.makelist.com !
Thanks Chuck
The first I had looked at, but the seond and thirs appear to be even more
comprehensive.
Conrad
Here is a list of info I have found:
1. Win32::ODBC FAQ at www.roth.net (good start)
2. Win32::ODBC Tutorial at www.netaxs.com/%7Ejoc/perl/article/Article.html
3. www.fastnetltd.ndirect.co.uk/Perl/perl-win32-database.html
Hope this helps.
----
Read this list on the Web at http://www.makelist.com/list/perl-beginner/
To unsubscribe, email to perl-beginner-unsubscribe@...
To subscribe, email to perl-beginner-subscribe@...
--
Start a FREE E-Mail List at http://www.makelist.com !
At 01:42 AM 8/5/98 -0500, you wrote:
>I'm new to scripting on the Win 32 platform, but it seems as though there a
>lot of options -- Perl, VB Script, Java Script, WSH, Kix, etc. How do I
>know that "Perl" is the "right" language to learn??? i.e., if I'm starting
>out with scripting, should Perl be my first language to learn, or would it
>be more beneficial to start off with something else and pick up perl
>ater? -Andy
Hmmm...hard question. I personally went from HTML to Javascript then to
Perl, and I'm still struggling along there.
In the past though I've tried to teach myself things like Pascal (yeah, I'm
old) and Visual Basic. I've accomplished more with Perl than I have with
any other language, and I feel like I have a better grasp on the beginnings
than any other language...
I'd say Perl is an appropriate place to start.
Greg Webster
----
Read this list on the Web at http://www.makelist.com/list/perl-beginner/
To unsubscribe, email to perl-beginner-unsubscribe@...
To subscribe, email to perl-beginner-subscribe@...
--
Start a FREE E-Mail List at http://www.makelist.com !
I'm new to scripting on the Win 32 platform, but it seems as though there a
lot of options -- Perl, VB Script, Java Script, WSH, Kix, etc. How do I
know that "Perl" is the "right" language to learn??? i.e., if I'm starting
out with scripting, should Perl be my first language to learn, or would it
be more beneficial to start off with something else and pick up perl
ater? -Andy
----
Read this list on the Web at http://www.makelist.com/list/perl-beginner/
To unsubscribe, email to perl-beginner-unsubscribe@...
To subscribe, email to perl-beginner-subscribe@...
--
Start a FREE E-Mail List at http://www.makelist.com !
I've noticed some of the questions that have been posted are not getting
answered, and I apologize. I'm fairly new to Perl myself and just don't
know everything.
The list is still small (though growing - about 2 subscriptions a day),
once we get more people here the answers will be flowing a little quicker
I'm sure. If anyone knows of people who have some Perl interest or
experience, please invite them in.
Thanks,
Greg
----
Read this list on the Web at http://www.makelist.com/list/perl-beginner/
To unsubscribe, email to perl-beginner-unsubscribe@...
To subscribe, email to perl-beginner-subscribe@...
--
Start a FREE E-Mail List at http://www.makelist.com !
Here is a list of info I have found:
1. Win32::ODBC FAQ at www.roth.net (good start)
2. Win32::ODBC Tutorial at www.netaxs.com/%7Ejoc/perl/article/Article.html
3. www.fastnetltd.ndirect.co.uk/Perl/perl-win32-database.html
Hope this helps.
Hi Kelly
>
> There where no previous posts as such, the one being referred to being the
> first one.
>
> Conrad
>
> -----Original Message-----
> From: Kelly Zhu, TSTC Library <kzhu@...>
> To: perl-beginner@... <perl-beginner@...>
> Date: 04 August 1998 09:01
> Subject: [PBML] ODBC with ms SQL
>
>
> Hi, all,
>
> I just subscribed to the list a moment ago. I am not quite
> clear about what has been discussed. But I want to know the
> details after reading the following post.
>
> Thanks.
>
> Kelly
> --------------------------
> Greg and all
>
> Let me be the first again.
>
> In order to link to a MS SQL server using ODBC, what is the
> preferred way of doing this?
>
> 1/2) use Win32:ODBC;
> 1). Sending a $db-sql(); Query.
> 2). How to retrieve the info returned and/or error info?
> 3). Appending a new record?
> 4). Updating an existing record?
> 5). Deleting a record?
>
> I'm a bit in the dark here, which must be apparent to all.
>
> Conrad
>
>
> ----
> Read this list on the Web at http://www.makelist.com/list/perl-beginner/
> To unsubscribe, email to perl-beginner-unsubscribe@...
> To subscribe, email to perl-beginner-subscribe@...
> --
> Start a FREE E-Mail List at http://www.makelist.com !
>
>
>
>
> ----
> Read this list on the Web at http://www.makelist.com/list/perl-beginner/
> To unsubscribe, email to perl-beginner-unsubscribe@...
> To subscribe, email to perl-beginner-subscribe@...
> --
> Start a FREE E-Mail List at http://www.makelist.com !
>
>
-----
Original Message: http://www.findmail.com/list/perl-beginner/?start=5
Start a FREE email list at http://www.FindMail.com/
----
Read this list on the Web at http://www.makelist.com/list/perl-beginner/
To unsubscribe, email to perl-beginner-unsubscribe@...
To subscribe, email to perl-beginner-subscribe@...
--
Start a FREE E-Mail List at http://www.makelist.com !
Hi,
i have problems with the perl -d (debug mode). If i want to view the
variables if i type in "V" all variables are listed. But when i use "|
V" (it works fine with the LINUX Perl !) to stop after each page the
Win32 perl version makes no return (one long line is printed !) !
how can i fix this ?
and how can i view a single variable ??
----
Read this list on the Web at http://www.makelist.com/list/perl-beginner/
To unsubscribe, email to perl-beginner-unsubscribe@...
To subscribe, email to perl-beginner-subscribe@...
--
Start a FREE E-Mail List at http://www.makelist.com !
Hi Kelly
There where no previous posts as such, the one being referred to being the
first one.
Conrad
-----Original Message-----
From: Kelly Zhu, TSTC Library <kzhu@...>
To: perl-beginner@... <perl-beginner@...>
Date: 04 August 1998 09:01
Subject: [PBML] ODBC with ms SQL
Hi, all,
I just subscribed to the list a moment ago. I am not quite
clear about what has been discussed. But I want to know the
details after reading the following post.
Thanks.
Kelly
--------------------------
Greg and all
Let me be the first again.
In order to link to a MS SQL server using ODBC, what is the
preferred way of doing this?
1/2) use Win32:ODBC;
1). Sending a $db-sql(); Query.
2). How to retrieve the info returned and/or error info?
3). Appending a new record?
4). Updating an existing record?
5). Deleting a record?
I'm a bit in the dark here, which must be apparent to all.
Conrad
----
Read this list on the Web at http://www.makelist.com/list/perl-beginner/
To unsubscribe, email to perl-beginner-unsubscribe@...
To subscribe, email to perl-beginner-subscribe@...
--
Start a FREE E-Mail List at http://www.makelist.com !
----
Read this list on the Web at http://www.makelist.com/list/perl-beginner/
To unsubscribe, email to perl-beginner-unsubscribe@...
To subscribe, email to perl-beginner-subscribe@...
--
Start a FREE E-Mail List at http://www.makelist.com !
Hi, all,
I just subscribed to the list a moment ago. I am not quite
clear about what has been discussed. But I want to know the
details after reading the following post.
Thanks.
Kelly
--------------------------
Greg and all
Let me be the first again.
In order to link to a MS SQL server using ODBC, what is the
preferred way of doing this?
1/2) use Win32:ODBC;
1). Sending a $db-sql(); Query.
2). How to retrieve the info returned and/or error info?
3). Appending a new record?
4). Updating an existing record?
5). Deleting a record?
I'm a bit in the dark here, which must be apparent to all.
Conrad
----
Read this list on the Web at http://www.makelist.com/list/perl-beginner/
To unsubscribe, email to perl-beginner-unsubscribe@...
To subscribe, email to perl-beginner-subscribe@...
--
Start a FREE E-Mail List at http://www.makelist.com !
Greg and all
Let me be the first again.
In order to link to a MS SQL server using ODBC, what is the
preferred way of doing this?
1/2) use Win32:ODBC;
1). Sending a $db-sql(); Query.
2). How to retrieve the info returned and/or error info?
3). Appending a new record?
4). Updating an existing record?
5). Deleting a record?
I'm a bit in the dark here, which must be apparent to all.
Conrad
----
Read this list on the Web at http://www.makelist.com/list/perl-beginner/
To unsubscribe, email to perl-beginner-unsubscribe@...
To subscribe, email to perl-beginner-subscribe@...
--
Start a FREE E-Mail List at http://www.makelist.com !
Heya all,
Looks like the list is popular, so far 30 people have signed up in a couple of
days.
Please feel free to start posting, there are enough people on here that it's a
good bet someone will reply. I'll be posting the occasional Perl Exercise or
scripts that I've been working on for the list, as well as working on a
Perl-Beginners webpage. But I can't keep up a conversation myself.
If anyone wants to, please feel free to post what you've done, or at least links
to a webpage.
As for now, I just finished my first attempt at graphics manipulation with Perl
at:
http://silverspin.web66.com/greg/experiments/worldmap/worldmap.shtml
If anyone wishes to find out more, email the list.
Thanks,
Greg
-----
Original Message: http://www.findmail.com/list/perl-beginner/?start=1
Start a FREE email list at http://www.FindMail.com/
----
Read this list on the Web at http://www.makelist.com/list/perl-beginner/
To unsubscribe, email to perl-beginner-unsubscribe@...
To subscribe, email to perl-beginner-subscribe@...
--
Start a FREE E-Mail List at http://www.makelist.com !
Perl Beginners Mailing List - The PBML is a list for the close-to absolute Perl
beginner, allowing more experienced (and very kind and patient) Perl programmers
to help those along who have an interest in programming Perl. This follows the
beginning ideal of Perl...free for all, public source and information, and
giving of time and effort to make it easy for others.
Beginners will be helping beginners so that both can learn, with aid from more
experienced people popping in to check for fresh ideas and give a helping hand.