Perl/TK

2004-04-07 Thread William.Ampeh
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

Re: A long time helper needs help

2004-04-02 Thread William.Ampeh
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

Re: A long time helper needs help

2004-04-01 Thread William.Ampeh
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

A long time helper needs help

2004-03-31 Thread William.Ampeh
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

Re: A long time helper needs help

2004-03-31 Thread William.Ampeh
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:

Re: get external process's output *and* return value

2004-02-25 Thread William.Ampeh
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

creating and/or converting pdf files to screen reader HTML format

2004-02-25 Thread William.Ampeh
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

Re: Using Getopt::Std

2004-01-13 Thread William.Ampeh
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

Re: coping txt files over a peer to peer.

2004-01-12 Thread William.Ampeh
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

Re: coping txt files over a peer to peer.

2004-01-09 Thread William.Ampeh
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

Re: coping txt files over a peer to peer.

2004-01-08 Thread William.Ampeh
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

Re: coping txt files over a peer to peer.

2004-01-08 Thread William.Ampeh
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__ __

Re: coping txt files over a peer to peer.

2004-01-08 Thread William.Ampeh
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

Re: case and functions

2004-01-07 Thread William.Ampeh
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;

PERL debuggers

2004-01-07 Thread William.Ampeh
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

Re: PERL debuggers

2004-01-07 Thread William.Ampeh
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/

Re: Microsoft Services for UNIX/LINUX

2004-01-06 Thread William.Ampeh
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

Re: Microsoft Services for UNIX/LINUX

2004-01-06 Thread William.Ampeh
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!!!

Re: What is the source of my input, file or STDIN?

2004-01-06 Thread William.Ampeh
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

RE: ActiveState ActivePerl 5.8 - system call

2004-01-06 Thread William.Ampeh
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

RE: ActiveState ActivePerl 5.8 - system call

2004-01-06 Thread William.Ampeh
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/

Microsoft Services for UNIX/LINUX

2004-01-05 Thread William.Ampeh
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

Web-based calendar script

2003-10-30 Thread William.Ampeh
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:

xml users group

2003-03-04 Thread William.Ampeh
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]

pdf2txt

2003-03-03 Thread William.Ampeh
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

RE: pdf2txt

2003-03-03 Thread William.Ampeh
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]

convert pdf files to text using Perl

2003-02-28 Thread William.Ampeh
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,

Re: Useradd and Passwd

2002-12-23 Thread William.Ampeh
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]

Parse instruction file

2002-12-18 Thread William.Ampeh
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

Parse instruction file

2002-12-18 Thread William.Ampeh
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

Parse instruction file, with my current program

2002-12-18 Thread William.Ampeh
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

Parse instruction file, with my current program

2002-12-18 Thread William.Ampeh
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

Re: Editors

2002-12-17 Thread William.Ampeh
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]

script to download a file. Script to

2002-12-16 Thread William.Ampeh
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.

Re: UNIX Admin and Shell Perl resources

2002-12-13 Thread William.Ampeh
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]

Re: Execute perl program without seeing the code?

2002-12-13 Thread William.Ampeh
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]

checksum implementation in perl

2002-12-12 Thread William.Ampeh
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,

automatic non-ftp download

2002-12-10 Thread William.Ampeh
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

perlcc

2002-08-26 Thread William.Ampeh
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]

Functional dependency

2002-05-01 Thread William.Ampeh
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

Functional dependency

2002-04-30 Thread William.Ampeh
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

starting a java bytecode off a server via html code

2002-04-25 Thread William.Ampeh
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

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 -- To

site blocking software

2002-04-01 Thread William.Ampeh
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:

Re: changing $0 on solaris?

2002-03-28 Thread William.Ampeh
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,

RE: DNS lookup

2002-03-19 Thread William.Ampeh
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;

Re: DNS lookup

2002-03-19 Thread William.Ampeh
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]

DNS lookup

2002-03-18 Thread William.Ampeh
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

Re: perl system function

2002-03-15 Thread William.Ampeh
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]

A training program on pdf scripting

2002-03-08 Thread William.Ampeh
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

Re: silly question

2002-03-08 Thread William.Ampeh
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

Can I do better than these configs

2002-03-06 Thread William.Ampeh
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:

Re: Can I do better than these configs

2002-03-06 Thread William.Ampeh
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]

Re: connecting to mysql database ?

2002-03-05 Thread William.Ampeh
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

querying DNS

2002-03-05 Thread William.Ampeh
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

Re: Installing Perl

2002-03-05 Thread William.Ampeh
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

Re: Comparing to many possibles

2002-03-04 Thread William.Ampeh
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]

Re: strip first space

2002-03-01 Thread William.Ampeh
$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

Re: DonĀ“t know how to install Perl

2002-02-27 Thread William.Ampeh
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

Re: KShell / Perl

2002-02-26 Thread William.Ampeh
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

Re: Using format()

2002-02-26 Thread William.Ampeh
#!/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;

Re: Book suggestion

2002-02-25 Thread William.Ampeh
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

Re: Unix commands in Perl scripts

2002-02-20 Thread William.Ampeh
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

Re: Illegal seek

2002-02-20 Thread William.Ampeh
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

Re: help with html

2002-02-19 Thread William.Ampeh
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

Re: Running Perl Scripts

2002-02-19 Thread William.Ampeh
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)%

Re: $|

2002-02-15 Thread William.Ampeh
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

Re: multiple __DATA__ entries possible? -- use (a here document)

2002-02-15 Thread William.Ampeh
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

Re: multiple __DATA__ entries possible?-- A cleaner way

2002-02-15 Thread William.Ampeh
#!{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 =~

Re: fsck

2002-02-15 Thread William.Ampeh
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)

Re: fsck

2002-02-15 Thread William.Ampeh
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

HTML Template and HTML Mason

2002-02-15 Thread William.Ampeh
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

Re: can't print input argument

2002-02-13 Thread William.Ampeh
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,

Re: off topic question : simple shell script

2002-02-08 Thread William.Ampeh
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

Re: TCl/Expect Question

2002-02-07 Thread William.Ampeh
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

Re: Illegal character error for blank line.

2002-02-06 Thread William.Ampeh
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

RE: Perl and CGI

2002-02-06 Thread William.Ampeh
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:

Re: Not your average system() question...

2002-02-06 Thread William.Ampeh
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

Re: wildcard for unix????

2002-02-04 Thread William.Ampeh
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]

Re: wildcard for unix????

2002-02-04 Thread William.Ampeh
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]

Re: [ma-linux] Just when you thought you are done, the - is there - appears

2002-02-01 Thread William.Ampeh
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

Just when you thought you are done, the - is there - appears

2002-01-31 Thread William.Ampeh
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

Re: [ma-linux] Just when you thought you are done, the - is there - appears

2002-01-31 Thread William.Ampeh
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

Re: writing formats

2002-01-29 Thread William.Ampeh
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

Re: directory is not change using chdir

2002-01-28 Thread William.Ampeh
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

Perl, Black book

2002-01-28 Thread William.Ampeh
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

Re: execution directory

2002-01-24 Thread William.Ampeh
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

creating labels in MS ACCESS

2002-01-18 Thread William.Ampeh
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

sample customer dbms in perl/mysql

2002-01-18 Thread William.Ampeh
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 --

Re: Parsing log file line entries

2002-01-17 Thread William.Ampeh
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

Re: Is there a way to get IP/Host name given the MAC address?

2002-01-15 Thread 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

Re: perldoc

2002-01-14 Thread William.Ampeh
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]

Re: Getting System Output in Variable

2002-01-14 Thread William.Ampeh
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]

Re: Manageable code

2002-01-10 Thread William.Ampeh
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

RE: interesting JAPH, how does this work?

2002-01-10 Thread 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. __

Re: Compile .cgi programs

2002-01-10 Thread William.Ampeh
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

Re: ^M's in file

2002-01-09 Thread William.Ampeh
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

Re: CGI perl html urgent

2002-01-04 Thread William.Ampeh
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:

Re: Insert text in HTML page...

2001-12-17 Thread William.Ampeh
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

Cookies on IE

2001-12-14 Thread William.Ampeh
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   2   >