Hello,
I am taking a look at some Ptk codes, and I think I need a to do some
reading. So my question is:
1./ What is a good source or reference materials/books on Perl/Tk?
2./ Can anyone recommend a class that will help lower my learning curve
(specifically on Perl/Tk). As far as Perl
Hello Jenda,
I am getting weak on regex.
Could you please break this down for me/(.*?-?\d+(?:\.\d+)?)/g
That is:
my @last_line = ($report[-1] =~ /(.*?-?\d+(?:\.\d+)?)/g); # split the last
line into fields (including spaces!)
Also, why did you use $report[-1] instead of
Wow!
Thanks a lot. I am going to try to decipher your code and hope you will
not mind me asking questions later.
It's a bit hard to give good suggestions if I do not understand the
data. Are all the data yearly like the stuff in page6.prn?
The data are bunch of report files, the format
Hello,
I am currently struggling with this project. I cannot even decide on the
best way to implement it, let alone start writing the code.
I have a set of tables that look similar to what I have pasted below:
(See attached file: page6.prn)(See attached file: page7.prn)
I am trying
Hello Jenda,
Thanks for your response. Now I can concentrate on how to hack the code.
What what is your take on how to represent the table entries (cells)? What
is the most efficient way to associate each cell with its parent header?
That given is:
Use
my $status = $?8
From your code, I could not tell how yoy were running MAKE (you were only
processing items in the make file).
So Assuming you were running make -f my_makefile.
Then this should do it.
#!/opt/local/bin/perl
$foo=`make -f my_makefile`; #you could replace line with
Hello,
Question 1:
How do I convert tables in pdf format to 508 compliant HTML files.
Using existing tools in xpdf, I am able to convert pdf files to text, and
hence with minimal Perl scripting able to create HTML tables. My boss,
however, want these files to be 508 complaint. Are there
Put quotes around your arguments. Use single quotes if you are not doing
variable substitution, and double quotes if otherwise.
That is:
my_program.pl -s 'will[1]' $will
__
William Ampeh (x3939)
Federal Reserve Board
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For
Hello David,
Thanks for your the sockets code. I have a few questions though.
1. I realized you used TCP instead of UDP for the protocol. Are there any
advantages of one over the other besides the fact the known drawback of
standard UDP protocol (i..e, no guarantee to sequencing and
Thanks David.
__
William Ampeh (x3939)
Federal Reserve Board
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response
I have implemented something similar using named pipes instead of sockets.
For send/receive type dialog, you may be better of trying EXPECT. It is
very easy to learn, and so cool to use.
__
William Ampeh (x3939)
Federal Reserve Board
--
To unsubscribe, e-mail: [EMAIL
Hello Dzhuo,
Your server code will not be able to handle multiple clients. You need to
undefine $file after closing the client connection. That is:
close(FILE) if($file);
close($client);
$file = undef;#-- you omitted this line
}
__END__
__
Hello David,
How would you convert your code to allow a bidirectional communication
between the clients and the server without the use of files or named pipes?
That is:
Client send a request to server, waits for server to respond,
Server processes client's request, and send response back to
You can do something like this:
my $flip = something;
SWITCH: {
( $flip =~ /^0$/ || $flip =~ /^1$/ || $flip =~ /^2$/ ) do {
$local_pref = FL; last SWITCH; };
( $flip =~ /^3$/ || $flip =~ /^4$/ || $flip =~ /^5$/ ) do {
$local_pref = FU; last SWITCH;
Are there any free PERL debuggers?
I once came across pvdb (a vi-aware front-end for the PERL debugger
developed by Tom Christainsen), but I never got it to work.
__
William Ampeh (x3939)
Federal Reserve Board
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional
No, I love perldebug, I was just wondering if I there were any other neat
tools unknown to me.
__
William Ampeh (x3939)
Federal Reserve Board
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
Thanks for all your suggestions and comments. I finally settled with
PC-ssh. This has a option for sending commands to a server
ssh -l {USENAME} -i {public authentication key} {SOME UNIX SERVER} {some
UNIX command}.
So all I did was to create a batch file on the PC, associate this file
Hello,
Putty has this:
Plink (a command-line interface to the PuTTY back ends)
http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
Thanks to all again. I just got came across a documentation for Putty, and
it provides an alternative to my original solution. And it is free!!!
So, 1. from within perl.script, how can one tell if the input stream is
coming from STDIN or a file that was opened by ?
Use select
2. If input stream is not coming from STDIN, but a file, how can one
tell which file is the current file (assuming multiple files were
specified on the command
You see, with cgi scripting if you attempt to write to the browser without
first printing
Content-type: text/html\n\n
You will get an error, and I thing this is what you are seeing.
If your validate.exe displays any information, you need to somehow
capture this, and then figure out in your
Could you please try this:
print Content-type: text/html\n\n$exit_value, $signal_num,
$dumped_core\n;
__
William Ampeh (x3939)
Federal Reserve Board
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
Hello,
The start of another year means new projects and hence more questions.
Are there any tools with the capabilities of (SFU 3.0) that allow users to
transparently run ?[ULi]nix-based applications (say, shell scripts) from a
Windows environment?
My current working environment consists
Hello,
I am looking for a Web-based calendar manager, preferably one that uses
postgres or mysql, Perl DBI, or plain text. Can anyone recommend one? I
mean one that is easy to use and manage.
__
William Ampeh (x3939)
Federal Reserve Board
--
To unsubscribe, e-mail:
Hello,
Is anyone aware of a group similar to this for XML?
__
William Ampeh (x3939)
Federal Reserve Board
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
I am trying to convert a pdf (and for that matter a postscript) type file
to plain text. Response to my earlier mail suggested using File:Slurp,
specifically;
#!/usr/bin/perl
use File::Slurp;
use CGI qw/:standard/;
$pdf_guts = read_file(/path/to/my.pdf);
-
In
Yes, and thanks to all. xpdf did it. I comes standard with Redhat 8.0, so
I did not have do download antthing.
Thanks a lot.
__
William Ampeh (x3939)
Federal Reserve Board
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Hello,
How do I convert pdf file (Acrobat readable format) to text, or simple read
these file types using Perl? Do I treat these file types as binary or
what?
Any pointers will be appreciated.
Thank you,
__
William Ampeh (x3939)
Federal Reserve Board
--
To unsubscribe,
Try
echo secret_number | passwd
or
echo secret_number | passwd -
Where secret_number is the password
__
William Ampeh (x3939)
Federal Reserve Board
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Hello,
I am trying to write a WEB page equation finder for files with the
following contents, and I think I am getting stuck (the program runs very
slowly, and at times I am not able to get all the variables. So I will
very much appreciate any help. Basically, I am trying to generate a Hash
of
Hello,
This is kind of sloppy, but it is what I have been able to come up with.
How can I make this more cleaner?
The data lines and output are at the end of this mail.
Thank you all.
#!/opt/local/bin/perl
#..End include subroutines
Hello,
This is kind of sloppy, but it is what I have been able to come up with.
How can I make this more cleaner?
The data lines and output are at the end of this mail.
Thank you all.
Program file:
(See attached file: build_inst.pl)
Data file:
(See attached file: mainadddeck.prn)
Output
Hello,
This is kind of sloppy, but it is what I have been able to come up with.
How can I make this more cleaner?
The data lines and output are at the end of this mail.
Thank you all.
Program file:
(See attached file: build_inst.pl)
Data file:
(See attached file: mainadddeck.prn)
Output
vi, emacs, xedit. Just make sure it is not a word processing package
(i.e., Word, WordPerfect, etc).
__
William Ampeh (x3939)
Federal Reserve Board
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Hello,
I was wondering is anyone will be willing to share a Perl script to
download a file with me. I tried the example on CGI::Simple, but I do not
know how to make reference to my proxy server xyx in the script. What I
ended up doing is to set the http_server variable outside at the shell.
http://www.tux.org/mailman/listinfo/ma-linux
__
William Ampeh (x3939)
Federal Reserve Board
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
The last time I attempted this, I got soo fraastrated. If you can get
perlexe to work, that is the way to go.
__
William Ampeh (x3939)
Federal Reserve Board
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Hello,
How do I compute the checksum of a binary file (and for that matter any
file) in Perl?
What I am trying to automate the download of a set of files. Now what I
will love to do is to check if a file has been modified since my last
download.
I thought a checksum check will be the best way,
Is anyone aware of a Perl module, script, etc. which can perform an
automatic download (similar to lynx)?
So say, I want to download and process the contents of the excel file at
the following site:
http://www.census.gov/indicator/www/m3/adv/table1a.xls
With Perls' ParseExcel module, I am able
Hello,
Has anyone experimented with perlcc?
If so, any pointers to how it works will be appreciated.
__
William
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
I got this problem from a friend and was wondering if anyone could help
out.
The following is a set of functional dependency for a relation R
(A,B,C,D,E,F) with A-D, BE-CDF, C-E, D-B
where A-D implies A determines D or D is functionally dependent on A.
Questions:
1. Compute the
I got this problem from a friend and was wondering if anyone could help
out.
The following is a set of functional dependency for a relation R
(A,B,C,D,E,F) with A-D, BE-CDF, C-E, D-B
where A-D implies A determines D or D is functionally dependent on A.
Questions:
1. Show with explanation
Hello,
Is there a way one could startup a server-side Java applet without logging
into the server?.
So say I have a Java bytecode sitting at:
http://www.rsma.frb.gov/fof/cgi-bin/JAVA/DigitalClock.class;
How do I start this via an html file? Here is my html code which does not
work
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
--
To
Hello,
Is there a site freeware site blocking software for IE or netscape. I need
this for home use.
My ISP is hawk.com and I pay 9.00 per month.
__
William Ampeh (x3939)
Federal Reserve Board
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:
I do not think your assertion is correct. You see $0 is the name of the
parent program, and $1 ..$9 the name of the arguments to $0. You can
modify the arguments ($1 .. $9) but not $0. The only way you can modify $0
is to start a new program. If you could include a copy of your program,
Can anyone tell me how to perform a dns lookup using perl?
I am using nslookup, what is a better way to do this?
Here is a snippet of my code :
#!/opt/local/bin/perl
%dns = NSLOOKUP($ARGV[0]);
print \n ip = $dns{Address} host = $dns{Name}\n\n;
Thank you Oliver. This is what I want. It is faster than my nslookup
script. Thank you.
__
William Ampeh (x3939)
Federal Reserve Board
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
I need to find a way to do a DNS lookup of a list of ips (at least 250
entries), get their corresponding hostnames and produce a report.
It sounds very simple, an I implemented it with nslookup ip (loop for 250
times).
I tried host -al (which produces a long list of host, so that with PERL
one
Remember your command ticks.
$my_output = `do_something`;
__
William Ampeh (x3939)
Federal Reserve Board
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
This may be of the topic, but I was wondering if anyone on this list is
aware of a training center that offers a course on Adobe pdf programming or
scripting.
I have been on Adobe's page but could not find anything in this line.
Basically what I am looking for is manipulating pdf files (create
A good forum is the linux forum.
Go to www.redhat.com, and join a group in your geographical region.
A good forum is
[EMAIL PROTECTED]
__
William Ampeh (x3939)
Federal Reserve Board
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL
Hello,
Putting on hold my current projects, I am thinking about building
(upgrading) a PC for home use, so far this is the best configuration I have
come up with. I can get a better deal anywhere?
Here are my configurations and prices. I am gearing towards Option 2.
OPTON 1
Motherboard:
Thanks a lot Joseph, and thanks to everyone who took time to respond to my
mail.
__
William Ampeh (x3939)
Federal Reserve Board
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
my $dbh = DBI-connect ( DBD:mysql :database=perl
:host=localhost,$username,$password)
^^^
|
should read DBI::mysql
The syntax is:
$dbh = DBI-connect(DBI:driver_name:database=database_name, username,
password)
The default host
Using PERL, how do I dump all the DNS entries of a nameserver?
REASON:
Given a set of host IPS, I want to come up with a table of IP vrs hostname.
I am currently in a DNS environment, so /etc/hosts is of no use. Instead
of querying DNS for each IP (using nslookup), I want to query the DNS
Basically, if you have the windows installer (InstMsiA.exe), all you need
is to download ActivePerl, and double-click
on the downloaded file (through My Computer icon).
For details, go to this site:
http://www.activestate.com/Products/Download/Get.plex?id=ActivePerl
and click on next, then
I prefer this
$x =~ /^[x-z]$/i;
Normally, I will use:
my $ans = ( $x =~ /^[x-z]$/i )?yes:no;
print \n\nThe answer = $ans\n;
__
William Ampeh (x3939)
Federal Reserve Board
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
$string =~ s/^\s+//; Removes leading whitespaces
$string =~ s/^\s+//g; /g (GLOBALLY) is redundant in the
case of leading whitespages
See PERL Cookbook page 30 for the answer to your question.
__
William Ampeh (x3939)
Federal Reserve Board
Basically, if you have the windows installer (InstMsiA.exe), all you need
is to download ActivePerl, and double-click
on the downloaded file (through My Computer icon).
For details, go to this site:
http://www.activestate.com/Products/Download/Get.plex?id=ActivePerl
and click on next, then
Remember, a child process inherits the variables exported by the parent,
and not the other way around.
So this what I do:
export foo=la, bar=bar, koobi=momoni
then in your Perl script, you have read in these variables
as:
#!/opt/local/bin/perl
my $aa = $ENV{foo};
my $bb = $ENV{bar};
my $cc
#!/opt/local/bin/perl
$CUR_TIME=`date +%B-%Y`;
$TITLE=Annual Report on Car Sales;
select (STDOUT);
$~ = STDOUT;
for ($i = 1; $i 10; $i++) {
$color = Red;
if ( $i % 2 ) { $color = Blue};
$col1 = ${color}_car_col_1;
$col2 = ${color}_car_col_2;
$col3 = ${color}_car_col_3;
My library includes this book, the SAMS, the O'Reilly books and others.
Personally, I prefer the SAMS book (Teach yourself Perl in 21 days). Other
users who have borrowed these two books, always return the Quigley book
first.
Do not get me wrong, the Quigley book is good, but the SAMS book is
If I understood your question, you could use system or command ticks.
That is:
system(cal) //be careful
or
$a = `cal`;
depending on how you want to treat the output.
If you want to manipulate the output, use command ticks.
__
William Ampeh (x3939)
Federal Reserve
I have lost track from who this was originally sent, but this is what I
think is wrong with
your script (the original script).
1. open requires 2 arguments, you had 1. So you may want to re-write your
open stmt as:
open FTPSCR, |ftp -n -v $hostname ftplog\n; #insert a comma
As a
If you are really determined to send an html document via email, you can
simply
rename the file(remove the .htm[l] extension), send it,
and let the recipients rename it back.
Alternatively, I will simply send the file in plain ASCII (text) form.
Another way is to compress the file, and send
Do this:
1. Open up a terminal session
2. Type which perl or to get the location of the Perl interpreter
3. On the very first line of your Perl program, insert the location of the
Perl interpreter as determined in 2.
In my case, this what I got:
momoni:/home/william/bin/PERL_CGI(4)%
Straight from the Perl Cook book.
7.12. Flushing Output (page 248)
when printing to a filehandle, output doesn't appear immediately. This is
a problem
is CGI scripts running on some programmer-hostile web server, where, if the
web
server sees warning from Perl before it sees the buffered
The closest you can get is to specify a here document. That is:
my @array=(END_DATA =~ m/^\s*(.+)/gm)
stuff in data
more stuff data
END_DATA
;
my @array1=(END_DATA1 =~ m/^\s*(.+)/gm)
stuff in data1
more
#!{location of Perl}
# Main Module --
my @array = one;
my @array1 = two;
print \n This is DATA:\n@array\n\nThis is array1:\n@array1\n\n;
#- BEGIN SUBS -
sub one {
my @array=(END_DATA =~
Chas wrote:
How exactly does this relate to Perl?
Well most times the Perl developer is forced to be the Systems Admin, and
most people on this list use Linux or some flavor of Unix, so I guess the
user
figured why not ask people on this list first?.
__
William Ampeh (x3939)
Always fsck your block devices (/dev/dsk/c#t#d#s#) and not your raw device
names (/dev/rdsk/c#t#d#s#).
That is:
fsck /dev/dsk/c0t1d1s1
fsck /dev/dsk/c0t1d1s2
Also, you must be in maintenance or single user mode (linux single).
--
Also, please remember
I am in the process of inheriting a bundle of Perl/HTML code implemented in
HTML:Mason
and
HTML::Template
For ease of maintenance I am planning to simply do away with one.
The question is which one?. I have not done much in Mason, but from what
I have
read, it sounds very promising and makes
You want to print the array ARGV and not the variable ARGV
For all command line arguments
print @ARVG
For the first command line argument,
print $ARGV[0]
__
William Ampeh (x3939)
Federal Reserve Board
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands,
This will do the job
File starts from the line #!/bin/bash
--- ---
#!/bin/bash
#--
#AUTHOR: William Ampeh
#PURPOSE: Reads input from $1 (a file) and print output to $2 (another
This will do it:
#!/usr/local/bin/expect -f
#exp_internal 1 #--- you
could uncomment this to turn debug mod on
set timeout 2
set prompt (%|#|\\$) $;# default prompt
log_user 1
catch {set prompt $env(EXPECT_PROMPT)}
eval spawn
In Unix, the person has to do two things
1./ On the very first line of the file, he/she has to insert the location
of his/her
PERL interpreter (the location of the PERL interpreter can be found with
which PERL).
For example;
redhat1:/home/(38)% which perl
/opt/local/bin/perl
A CGI script could be a shell script, a compiled program written in
C/C++/PASCAL (I even have a
client whose CGI programs were developed in FORTRAN), PERL, PHP, EXPECT,
TCL. Basically
any program that can run on your WEB server (without going in details).
CGI scripts,need not contain:
I usually do not use system or command ticks.
I always pipe the output to STDOUT if I wish to manipulate the output of
any system
command. Alternatively, you could redirect output to a TEMP file, then
read from that file,
but piping is more efficient.
open MY_STDOUT, {system command} | or
It is
chmod -R *
-R for recursive
__
William Ampeh (x3939)
Federal Reserve Board
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
It is
chmod -R *
-R for recursive
__
William Ampeh (x3939)
Federal Reserve Board
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Thanks to all who responded to my mail, especially Geoff. The best
solution, I think, will be for
me to throw in a login screen, but this has been ruled out. The IP range
solution has lots of
question marks, including what Geoff pointed out. I am basically stuck and
will need any
suggestion
Hello,
Is there a better way to solve this?
PROBLEM:
I have set up a web site for a government big contractor, it currently
works fine.
The only problem is that WEB server has been configured to allows access to
this
site based on a range of IP address. If a new organization subscribes to
Well, my boss wants to find out if there is a BETTER solution.
I do not want to say NO right away, so I figured why not as
around? He might be right. There may be an alternative
solution.
Personally, I wish there is not. Because I have had it with
this project.
__
William
The trick is to make sure that your output file has the same name as your
main format routine.
So in my case I have:
select (STDOUT);
and
format STDOUT =
The STDOUT_TOP is automatically selected at the beginning of each page.
Maybe this will help (that is if it is not too late)
The
This is what happened. The Perl process did change dir, but remember when
it ends
it goes with all its baggage, so the parent process does not have anything
to do
with the chdir.
Try this:
#!/opt/local/bin/perl
$dirname = ./TEST;
chdir($dirname); #this sets current directory to ./TEST
What do everyone think about this book?
Perl
Second Edition
Black Book
By Steven Holzner?
Price: $59.99 (41.99 @Amazon)
I was at Borders last night
PS: Of course the list has been a valuable resource, but I am looking for
a very good
book on my shelf.
Also, what is a very good book on
And this test.pl script uses some other
scripts in directory A to do some processes
Are these scripts subroutines? How are they called by script A?
If they are subroutines, simply insert the following line just before
they are called:
unshift (@INC, {absolute path of directory A})
Of
Hello all,
This might not be the right place for this question, but I trust this
group.
My boss wants me to create a mailing list from
his MS ACCESS database. I am not an MS fun, but I cannot tell him this.
So my question is how do I create labels from an ACCESS database.
Thanks
Hello,
I have just been asked to come up with Perl/Mysql demo on Monday.
Considering the short notice, I was wondering if anyone can point me to a
freeware
WEB-base database system implemented in Perl and Mysql.
Thank you.
__
William Ampeh (x3939)
Federal Reserve Board
--
In place of this:
if(/.+\[(\S+)\]:\s+SITE|DEVICE\s+(\S+.+)\s+LEVEL\s+(\S+)\s+LOGLEVEL\s+(\S+)
\s+STATE\s+(\S+.+)\s+.+$/)
Use this:
if(/.+\[(\S+)\]:\s+SITE|DEVICE\s+(\S+.+)\s+LEVEL\s+(\S+)\s+LOGLEVEL\s+(\S+)
\s+STATE\s+(\S+)$/)
It should work for STATE
__
William Ampeh
1. SUN without DNS: arp -a
2. SUN with DNS: arp -a; nslookup hostname
For Example:
% arp -a | grep '00:55:'
Net to Media Table
Device IP Address Mask Flags Phys Addr
-- --- - ---
hme0 notsoolate.foo.com
More should have worked, you can try this:
perldoc -f some_functions |tee text_file.txt
__
William Ampeh (x3939)
Federal Reserve Board
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Use command tick. That is:
$my_sys_out = `{SOME COMMAND`};
E.g.: $my_date = `date`;
__
William Ampeh (x3939)
Federal Reserve Board
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Could you let us know the results you were expecting?
Also, remember that the printf statements will be printing
to a file with NEWQUOTES as a pointer.
If NEWQUOTES has net been declared, nothing will be printed, and without
use strict, PERL will complain.
__
William Ampeh
Try this:
#!/opt/local/bin/perl
#!/usr/bin/perl
my $A=a;
for(0..285074){
$A++;
print $A:;
}
print\n\n$A\n;
--
This reemphasizes a mail I just read from someone on this
list about the need to write clearly readable codes.
__
This is the obvious solution, but one may also ask what is the '.cgi'
written in?
That is, is a Perl cgi, a Shell script cgi, a C cgi, etc.
If it is a Shell script cgi, a Perl script, then, of course you will need
to make it
executable, you also will want to include
#!{location of shell}
If
Unix comes with the dos2unix and unix2dos commands (or scripts) that
takes care of the ^M problem.
If you do not have dos2unix, you could use sed or vi.
In sed:
sed 's/^M//' {infile} {outfile}
where ^M is created by
holding down the Ctrl and press the character v key followed by
So many things were wrong:
Here is a cleanup version:
(See attached file: VoirStock.cgi)
I inserted line 21 for my purposes, so uncomment line 20 and comment out
line 21
20 #$fichier = ../src/Stock.txt;
21 $fichier = Stock.txt;
Output:
I hope you do not forget pre before dumping the contents of the file.
--
#!/opt/local/bin/perl
$my_file = aa.txt;
open(IN, $my_file) or die \n\ncannot open file\n\n;
@aa = IN;
print EOF;
Content-type: text/html
htmlbody bgcolor=white text=blue
pre
Hello,
In Internet Explorer, how do I turn on/off cookies?
__
William
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
1 - 100 of 105 matches
Mail list logo