I'm new to perl too, but I think I can help. As far as I can tell,
perlscript is embeded right into an HTML file the same way you do VBScript
or JavaScript, so your file would have the regular *.html extention. If on
the other hand, you are using a full fledged perl program, you can run it
from
mains. I can't seem to get any data into my database.
Unless I do it one field at a time...which would be preposterous. There has
got to be a way to do this!
- Original Message -
From: Tillema, Glenn <[EMAIL PROTECTED]>
To: 'SAWMaster' <[EMAIL PROTECTED]>
Sent:
Hi group!
Ok, I'm trying to open all files in the directory containing my script, and
search each one for lines containing my search string. This is my code so
far:
$i = 0;
opendir(logdir, '.') or die "Can't open directory.";
print "Enter string to search for: ";
$searchstring = <>;
print "\n";
$i = 0;
opendir(logdir, '.') or die "Can't open directory.";
print "Enter string to search for: ";
$search = <>;
print "\n";
#print join("\n", readdir(logdir));
print "\n";
@filelist = readdir(logdir);
while($i < ($#filelist))
{
open(logfile, @filelist[$i]);
$i++;
while()
{
> Ok, I think I understand you, but things still are not working right.
Never mind, I forgot to chop my search string. Works great now :)
TDH (That DID help) lol.
Hi group.
Short 'n sweet question. Is there a way to run perl programs from the command line
without having to precede usage with "perl"
so I can go
myprogram [Arguments]
Instead of
perl myprogram [Arguments]
If there is no way to do this...would making a bat file (windows) of the same nam
Yes and no. You cannot do it with telnet, but you can get what you want by
using an x-term client and setting up the server box to allow x connections.
One commercial example of an X-Term client for a windows box would be
X-Win32. Do a search on the net for "X-Win32" and you'll find plenty of
in
Hi group! Just got back from a trip, and I'm a little rusty (a rusty newbie, JOY)
Anyway, before I left I was having trouble inserting new data into my database table,
and oddly enough, the problem didn't solve itself while I was gone. :(
Here is my current code. I've been racking my brain, a
I'm working on a fairly lengthy ( for a newbie like me) program that has two modes.
The user can type "mine blah" and my program will find all "blah" or he/she can type
"mine !" to enter interactive mode. The problem is that when I get to this snippet:
sub getinteractivesearch
{
#pri
Paul, yeah the print is there just to help me debug. Isn't <> the same as ?
Are you saying I should change that?
Bill, it is a perl file that I used pl2bat to convert to a batch file. I can run it
either way, as a .pl or as a .bat...the result is the same.
-Dave
Hi group, just wanted to thank all who helped me out with this little problem,
particularly Paul Johnson who's input ended up being the key to my problem.
I appreciate all of your help!
-Dave
Hello group!
I'm trying to list all files in a directory EXCEPT the current and the parent
directories.
ie.
.
..
file1
file2
file3
Is not what I want. I only want:
file1
file2
file3
I thought I had the right code, but I don't.
while($i < ($#filelist))
{
if ((@filelist[$i] ne '.') || (
Hi group!
Little bit of background. I made a perl cgi that scans a directory for files and auto
generates a html page with hyperlinks to download whatever files are in the directory.
I don't
know if there's an easier way to do this than what I did (built it from scratch) but
I'm doing this t
Can someone tell me why this isn't working on IE?
It works within Opera, I don't know about netscape yet.
print qq~http://mypage.html";>\n~;
;
> Same probably applies for your line. Just add the "Refresh: 5" header to
> your script instead of using the meta.
>
> Hope this helps,,,
>
> Aziz,,,
>
> In article <[EMAIL PROTECTED]>, "Sawmaster"
> <[EMAIL PROTECTED]> wrote:
>
> &
I can't seem to use variables like thiswhy not?
Is there a simple way to do this?
Without having to manually do it with an array traversing check/change function?
$workingcopy =~ tr/$lettertochange/$lettertochangeto/g;
I also tried
$workingcopy =~ s/$lettertochange/$lettertochangeto/g;
Th
Thanks guys, that part now works thanks to all who supported me.
I've run into a similar problem now though in this code:
print "Select a letter to change to: ";
$lettertochangeto = ;
if ($lettertochangeto =~ m/$workingcopy/i)#PROBLEM LINE I THINK
{
print "That letter is already be
Can someone tell me if ANSIScreen works under windows98?
I have the module installed, but instead of color showing up in my program, I seem to
get some kind of color code.
Ex.
[1;34mThis text is bold blue.
ANSIColor, and ANSIScreen are both installed, if color doesn't work, will any of the
screen stuff work either?
What is wrong with this line?
print qq~\n~;
Some reserved word in there?
The error is "Premature end of script headersif that helps.
If I take that line out it works fine (CGI wise, not HTML wise)
Can someone help me?
-Dave
Hello, can someone tell me why DBI can only handle 6 fields? I have a data base table
that has more than 6, and I don't know how I'm going to accommodate it all in my cgi
script. I'm new at this.
qq~FOR SALE\n~;
}
print qq~\n~;
$sold = "no";
}
print qq~\n~;
print qq~\n~;
print qq~\n~;
print qq~\n~;
- Original Message -
From: Mel Matsuoka <[EMAIL PROTECTED]>
To: SAWMaster <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, September 19, 2001
Hello group.
I need someone who has a lot of experience to help me...possibly on an on going basis
because I have asked for help on this issue before to no avail.
Everyone says that it looks right...but it is not right. Something is wrong.
When I click the link (with a freshly erased browser
Hello, I have a script that is acting funny.
I have this line in it:
$addtocart_co->header(-cookie=>$pid_cookie);
Does that line not handle the content type as well?
I get "premature end of script headers" with just that.
But if I add this line:
print "Content-type: text/html\n\n";
It works
> Yes. You did print out the return value, didn't you? The header method
of
> CGI.pm doesn't print the header out, it returns it; you have to print it
out
> yourself.
No I didn't, I did not know I needed to. It works great now thanks AGAIN!
-Dave
--
To unsubscribe, e-mail: [EMAIL PROTECTED
Hello group. I am getting an error in my apache logs that is not clear to me what
exactly is wrong.
I get the same error in different scripts, and completely different lines, so I'll
just post one and hopefully once I know how to fix this one, I can fix the rest.
Line 27:
$cookie = $addtocar
Is there a way to "block comment" in Perl?
My book only covers using # to comment individual lines.
Is there a symbol I can use to comment out entire sections of code for the debugging
process?
Hello again group.
I've been stareing at this for ages trying to figure out why it's not working, I can't
see why it's not.
Am I blind?
I think my trouble is in the very last section. What I'm trying to do is when a user
hits "back" after clicking an item to put in his/her cart, the button is
28 matches
Mail list logo