Sir Douglas Cook,
I've recently come across Indigo Perl. IndigoPerl is a binary build of Perl 5.6
for Win32 with
an integrated Apache web server for testing and developing CGI scripts. It also
includes mod_perl. The instalation is trivial. Indigo Perl is not intended to be a
'real
I thought it might be alittle cryptic when I reread it.
This is the part of the program in question
$search_str = $x-param('search_str');
$choice = $x-param('choice'); (Choice is a html select of emailname or accountnumber)
if ($choice eq accountnumber) {
$search_str =
Hi friends
Please
What modulo recomended for send emails that i can attachment a file.
Thanx
--
Nunca creas feliz a nadie que esté pendiente de la felicidad.
Se apoya en una base frágil quien pone su alegría en lo adventicio.
El goce que viene de afuera, afuera se irá.
Por el contrario, aquel
This may not be the best answer, cause I'm just learning CGI/Perl myself...
but I've ran into that same error in the last couple days, and this is what
I do to fix it...
Make sure you have use CGI qw(:cgi); included in your script, and after
you've done whatever you need to do with the HTTP
Argenis Perez wrote:
What modulo recomended for send emails that i can attachment a file.
try mime::lite. it's easy to use and attachments are no problem.
http://search.cpan.org/search?dist=MIME-Lite
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL
-Original Message-
From: Hewlett Pickens [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 30, 2002 7:01 PM
To: [EMAIL PROTECTED]
Subject: How To Display Browser Headers
Does anyone know of a way to get Microsoft's Internet
Explorer to display
the HTTP headers it transmits?
I made other changes in my cgi, now it trys to download the form instead
of the desired data. I tested this on another computer using Netscape and
everything worked fine. Obviously it is an IE bug. Has anyone seen it or
know of a work around?
Belinda
-- Forwarded message --
Hi Hewlett,
on windows I typically use HttpTracer to intercept headers; basically you
set up IE to use HttpTracer as a proxy and then HttpTracer shows you all the
HTTP info.
Its shareware and I think I had to pay a nominal fee after using it for a
while. You can get HttpTracer from
Hi,
I am updating an old Script.
Are there any problems or 'Y2k' bugs,
in the following change?
Thanks,
Dave
#!/usr/bin/perl
use CGI qw/:standard/;
use CGI::Carp qw(fatalsToBrowser);
use POSIX 'strftime';
# NEW -- replaces the block below
$date = strftime('%A, %B %1d, %Y %I:%M
cool. thats how i do it :-) you don't think i actually write any code do
you ;-)
-Original Message-
From: Debbie McNerney [mailto:[EMAIL PROTECTED]]
Sent: 30 January 2002 18:14
To: Beginners perl
Subject: undefined variable
Please accept my apologies for being so dumb. I am a beginner
Dear all,
I need to know how to link a MySqldatabase on to a web interface like a
HTML-form with perl programming .basically I need to retrieve data from the database
onto the webinterface by using search methods.I'd appreciate if U provide me with
some useful links regarding the
Hello,
I have an input form on a website where I need to fill in some data.
I want to do this via a (simple) perl script...
my link is for example
http://my.server.com/cgi-bin/script.pl?par1=val1par2=val2par3=val3
I want to access the site from a perl script without...
Which perl modules do I
On Thursday 31 January 2002 02:43 pm, katta ananta mohan wrote:
Dear all,
I need to know how to link a MySqldatabase on to a web interface
like a HTML-form with perl programming .basically I need to retrieve data
from the database onto the webinterface by using search methods.I'd
If you want to loop over all the form fields, you'd do:
for $field (param()) {
print $field = , param($field), br\n;
}
How can the param's be placed into a new hash?
CGI.pm has a Vars() method, I believe, which returns a hash.
use CGI;
my $q = CGI-new;
$data =
On Thursday 31 January 2002 11:45 am, you wrote:
If you want to loop over all the form fields, you'd do:
for $field (param()) {
print $field = , param($field), br\n;
}
How can the param's be placed into a new hash?
CGI.pm has a Vars() method, I believe, which
Hi !
Sorry for the previous posting, im not yet completely awake ;o)
How can the param's be placed into a new hash?
CGI.pm has a Vars() method, I believe, which returns a hash.
use CGI;
my $q = CGI-new;
$data = $q-Vars;
print $data-{field}; # etc.
Just a little add
Hi, Gary !
On Thursday 31 January 2002 12:16 pm, you wrote:
Thanks, I tried and didn't understand it.
Dit it work at all ?
I think %data = $q-vars would be better to read and I'm not sure if the
Vars() function returns a reference or a hash.
Ok, i'll try
A hash is a data comfortable
COM LOUVOR (este foi o título da reportagem do Correio Braziliense do
dia 22/12/01 a respeito da seguinte situação): ... Bruno, (o filho do
presidente do TJDF) fez concurso público para o cargo de segurança. Eram
12 vagas disponíveis, com um salário de R$1300,00, e nível exigido de 2º
Kredler Stefan wrote:
there is another loop. The whole construction looks like this:
for(@file1) {
$_ =~ s/[\r]|[\n]//;#remove CR and DOS CR
[\r] and [\n] are a character class with a single character so the
brackets are not needed. The match isn't anchored and the global
sub add_module
{
my($tempposition,$name,@variables) = @_;
my $mdl_output;
do $name.mdl;
if ($mdl_output=ModulAdd(@variables))
{
$html_write{$tempposition}=$html_write{$tempposition}$mdl_output;
}
undef ModulAdd;
my $length=length($mdl_output);
}
:
:.. Roman
hi
i am playing with CGI and tables
how do i set the width of a cell?
my $embeddedtable = table({-border = 0},
Tr[
td(['Title', $title]),
td(['First Name', $firstname]),
td(['Last Name', $lastname]),
I usually do TD WIDTH='60' or TD WIDTH='60%' please note that both are different
lengths of the screen.
Darryl
-Original Message-
From: Martin A. Hansen [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 31, 2002 7:47 AM
To: [EMAIL PROTECTED]
Subject: width of table cells and CGI ???
thats is pure HTML code... i know!
i want to do it the CGI way!
aint there a -width = 150 switch i can set?
martin
On Thu, 31 Jan 2002, Darryl Schnell wrote:
I usually do TD WIDTH='60' or TD WIDTH='60%' please note that both are different
lengths of the screen.
Darryl
-Original
On Thu, 31 Jan 2002 13:58:04 +0100 (CET), Martin A. Hansen wrote:
thats is pure HTML code... i know!
i want to do it the CGI way!
aint there a -width = 150 switch i can set?
...
td({ width = 150 }, ['Title', $title]),
...
--
briac
dynamic .sig on strike, we apologize for the
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 30, 2002 5:48 PM
To: Perl Discuss
Subject: forking wrecks havoc with print statements
hello all, i'm having some issues with subroutines being ran
on a forked
process. the
Bob Showalter wrote:
No. A \n in your program is an ASCII linefeed (10) character
on either platform.
So, \n equals a LF, thank you.
What happens on Windows is that when you are reading a file,
each CR/LF pair from the file is changed to a single LF char
before the data is returned to
Dave Benware wrote:
CR/LF has never been translated to a LF while reading a file
for me. If that were true, the whole situation would be
transparent and I would have never asked the question it seems.
I didn't see anything about this translating in the docs
on the binmode function.
Bompa
snip href=perldoc perlport
ISSUES
Newlines
In most operating systems, lines in files are terminated
by newlines. Just what is used as a newline may vary from
OS to OS. Unix traditionally uses `\012', one type of
DOSish I/O uses `\015\012', and Mac OS uses `\015'.
Perl uses `\n' to represent
-Original Message-
From: Dave Benware [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 31, 2002 8:51 AM
To: Beginners perl
Subject: Re: What is the newline character (\n) equal to?
Dave Benware wrote:
CR/LF has never been translated to a LF while reading a file
for me. If
I thought it would be good to be able to do this:
$item = blah;
$item =~ tr//(lt;)(gt;)/;
to convert those symbols to their entity references.
however, the tr operator doesn't seem to like using () to group... any
comments on how to make this operation in to a one-liner?
Thanks
Mike
--
-Original Message-
From: Bob Showalter [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 31, 2002 9:02 AM
To: 'Dave Benware'; Beginners perl
Subject: RE: What is the newline character (\n) equal to?
-Original Message-
From: Dave Benware [mailto:[EMAIL PROTECTED]]
$item =~ s//lt;/g; $item =~ s//gt;/g;
Well. It is on one line ;)
John
-Original Message-
From: KAVANAGH, Michael [mailto:[EMAIL PROTECTED]]
Sent: 31 January 2002 14:06
To: '[EMAIL PROTECTED]'
Subject: html entity conversion... one liner?
I thought it would be good to be able to do
I have a file whose contents are of the form :
NET_A OUTPUT (
REQUIRED (
_UP %0.093 BR CLK
_DN %0.093 BR CLK
)
)
NET_B OUTPUT (
REQUIRED (
_UP %0.093 BR CLK
_DN %0.093 BR CLK
)
)
I would like to read in this file in and modify the
contents to be as follows
On Thu, 2002-01-31 at 09:06, KAVANAGH, Michael wrote:
I thought it would be good to be able to do this:
$item = blah;
$item =~ tr//(lt;)(gt;)/;
to convert those symbols to their entity references.
however, the tr operator doesn't seem to like using () to group... any
comments on how
On Thu, 31 Jan 2002 14:06:06 -, Michael Kavanagh
[EMAIL PROTECTED] wrote:
I thought it would be good to be able to do this:
$item = blah;
$item =~ tr//(lt;)(gt;)/;
to convert those symbols to their entity references. however, the
tr operator doesn't seem to like using () to
If the file is fixed in this format, then you could do a check for
)
and write the line after that is found. Then continue with the file. For
example
open IN, c:/input.txt || die Can't open c:/input.txt: $!;
open OUT, c:/new.txt || die Can't create c:/new.txt: $!;
while (IN) {
if
I believe that is not possible. A server side script can't launch a
client's browser.
Alan C. wrote:
Hi,
Win 2k with MSIE web browser
Whether or not my web browser is already been launched/opened
Can a Perl script do that task? Or a perl module?
Able to do without bringing up a
Why *must* it be a one liner. I think my suggestion is easier to understand
for someone having to maintain your code. If there is no other reason than
I want a one liner to do this on one line, then why not do it on two??
Just because it is possible in one line, doesn't mean it's the best
Michael Kavanagh wrote:
I thought it would be good to be able to do this:
$item = blah;
$item =~ tr//(lt;)(gt;)/;
tr/// will translate the '' to a '(' and the '' to a ''.
to convert those symbols to their entity references.
however, the tr operator doesn't seem to like using () to
On Jan 31, Gary Hawkins said:
for $field (param()) {
print $field = , param($field), br\n;
}
How can the param's be placed into a new hash?
CGI.pm has a Vars() method, I believe, which returns a hash.
use CGI;
my $q = CGI-new;
$data = $q-Vars;
print
On Thu, 2002-01-31 at 09:39, John Edwards wrote:
Why *must* it be a one liner. I think my suggestion is easier to understand
for someone having to maintain your code. If there is no other reason than
I want a one liner to do this on one line, then why not do it on two??
Just because it is
Hello - when printing out a lot of my c++ code I go from a nice color
syntaxed environment to a plain old black and white.
If there isn't already something else out there I would like to write a Perl
script that changes all comments to green for example and preserves the tab
spacing into the
-Original Message-
From: KAVANAGH, Michael [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 31, 2002 9:06 AM
To: '[EMAIL PROTECTED]'
Subject: html entity conversion... one liner?
I thought it would be good to be able to do this:
$item = blah;
$item =~ tr//(lt;)(gt;)/;
I am going to break one of my rules and suggest a non-perl solution. There
probably is a way to do this in perl however if I understand your requirement
correctly you can use a good text editor instead. There are text editors out
there that do syntax highlighting -- they will make comments,
I have a question regarding writing to a file.
I have written a script and my experiences in perl thus far has been limited
to outputting data to a JSP page but in this case I need to send it to a
excel file. Does anyone know if there are examples out there that can show
me how to do this?
Hi,
I am trying to write a perl5 script on Redhat that will use the ssh module
and pass various commands to various servers. I am trying to run multiple
commands using ssh2 and run commands as root. I am unable to log in
directly as root and need to use the su - command. However, I recieve
I have a simple hash with directory names as keys and sizes as values. I
would like to print the hash, in descending order of the size of each
directory.
I was contemplating of reversing the hash(so that sizes become keys and
directory names become values) and then do a sort on the keys.
You can also use Nedit www.nedit.org if your not a big emacs fan.
-Original Message-
From: Gary [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 31, 2002 10:47 AM
To: Booher Timothy B 1stLt AFRL/MNAC
Cc: [EMAIL PROTECTED]
Subject: Re: text to html converter
I am going to break one of
What OS are you running? I've included a script that uses Win32::OLE to
interface with Excel. You'll need to be on a Win32 machine, with Excel
installed.
There is also a module called Spreadsheet::WriteExcel which is platform
independant, but I have not had any experience using this.
HTH
I am working on a Solaris box. So I will try the winExcel, hopefully that
will solve this.
Thank You
Lance
-Original Message-
From: John Edwards [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 31, 2002 7:50 AM
To: 'Lance Prais'; PERL
Subject: RE: Writing to a file
What OS are
On Jan 31, [EMAIL PROTECTED] said:
I have a simple hash with directory names as keys and sizes as values. I
would like to print the hash, in descending order of the size of each
directory.
# this sorts your keys based on their values, descending
@keys = sort { $hash{$b} = $hash{$a} } keys
hi. i keep getting wierd errors when i try to split a string. the string
is
split(/?/,$testdata);
the error i get is
/?/: ?+* follows nothing in regexp
what does it mean
Thanks
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Reversing the hash is more work than it's worth, as you've found out.
Certainly true and here is my mea culpa :))-
It just did not occur to me about the,
@keys = sort { $hash{$b} = $hash{$a} } keys %hash;
statement. Thanks Japhy and Nikola.
- Rex
I got the same results using ActiveState on NT 4.0 but
cyqwin gives me:
length is 4
-rw-r--r--1 dennis None5 Jan 31 10:02 foo.txt
length is 5
length is 5
I will leave the analysis to someone more qualified than I!
Good Luck!
Dennis
--
To
The question mark is a special character in a regular expression meaning
zero or one and *must* follow a character or character class.
If you want to split on the question mark character you need to escape it so
that it no longer has special meaning. Like this:
split(/\?/,$testdata);
Rob
So you can see that the string is 4 bytes long. When I write it to the file,
the file becomes 5 bytes, because the LF is converted to a CR/LF pair. When
I read it back in, the reverse conversion is made, so the string becomes 4
bytes again. When I call binmode, that conversion is not
? is a special charater (a quantifier like * or {6} )
it quantifies to 0 or 1;
it's also a modifier to a quantifier causing it to match the least of the
quantifier.
Just put a \ in front of it
split(/\?/,$testdata);
-Original Message-
From: Darren Simpson [mailto:[EMAIL PROTECTED]]
The //'s around the ? treat the first paramater of the split() function as a
regular expression, which treats the question mark as a special character
(saying to match the preceding char(s) zero or one time). If you're trying
to split $testdata with an actual question mark, try using quotes
I am attempting a program that reads a list of numbers from the screen until
the number 999 is read. It then prints the sum of all numbers read- with
the exception of the 999.
My code looks like:
until ($number=999) {
print Please input your number:\n;
chomp($number=STDIN);
@a=$number;
}
Oops - split cannot take ? as its first parameter - I apologize ... go w/
the /\?/ approach. :)
Jason
If memory serves me right, on Thursday 31 January 2002 11:15, Jason Purdy
wrote:
The //'s around the ? treat the first paramater of the split() function as
a regular expression, which
--- Jan Gruber [EMAIL PROTECTED] wrote:
Hi !
Sorry for the previous posting, im not yet completely awake ;o)
How can the param's be placed into a new hash?
CGI.pm has a Vars() method, I believe, which returns a hash.
use CGI;
my $q = CGI-new;
$data = $q-Vars;
There is a great article you can read about using
Spreadsheet::WriteExcel and Spreadsheet::ParseExcel modules.
It can be found here:
http://www-106.ibm.com/developerworks/linux/library/l-pexcel/
HTH!
Lance Prais [EMAIL PROTECTED] 01/31/02 12:45PM
I have a question regarding writing to a
A couple of things here ...
1) Watch out for = vs. == ... very tricky! Your first until loop won't even
eval b/c $number=999 is always true.
2) @a=$number; is not what you want... I'm not even sure what that does. You
probably want to use the push function, like so:
push @a, $number
At 11:09 AM 1/31/2002 -0500, you wrote:
I am attempting a program that reads a list of numbers from the screen until
the number 999 is read. It then prints the sum of all numbers read- with
the exception of the 999.
My code looks like:
until ($number=999) {
print Please input your number:\n;
You are using the assignment operator in your until and if blocks, and
*not* the comparison operator. You need to use the double equals for what
you want...
until ($number == 999)
And
if ($number == 999)
Rob
-Original Message-
From: Rambog [mailto:[EMAIL PROTECTED]]
Sent: Thursday,
Change
until ($number=999) {
and
if ($number=999) {
to == 999. You are assigning the value 999 to the $number var in both cases,
not checking if it is equal to 999.
Simple mistake, we've all made it ;)
HTH
John
P.S Here is how I would code this script.
use strict;
my ($number, $total);
On Jan 31, Rambog said:
I am attempting a program that reads a list of numbers from the screen until
the number 999 is read. It then prints the sum of all numbers read- with
the exception of the 999.
My code looks like:
until ($number=999) {
You want ==, not = here.
print Please input your
Supposedly there's a module out there called Spreadsheet::WriteExcel, but I
haven't tried it yet. That might also be worth a look.
-Original Message-
From: Lance Prais
To: John Edwards; PERL
Sent: 1/31/02 9:57 AM
Subject: RE: Writing to a file
I am working on a Solaris box. So I
At 11:35 AM 1/31/02 -0500, Dave Benware wrote:
The line system dir foo.txt; returned Bad command or file name.
foo.txt does exist and I can run dir foo.txt within a dos box just
fine. Interestingly to me, system dir; worked okay. I guess it
just won't take an argument.
So, have I installed
| sub add_module
| {
| my($tempposition,$name,@variables) = @_;
| my $mdl_output;
| do $name.mdl;
| if ($mdl_output=ModulAdd(@variables))
| {
|
$html_write{$tempposition}=$html_write{$tempposition}$mdl_output;
| }
| undef ModulAdd;
| my $length=length($mdl_output);
| }
Indentation
Peter Scott wrote:
At 11:35 AM 1/31/02 -0500, Dave Benware wrote:
The line system dir foo.txt; returned Bad command or file name.
foo.txt does exist and I can run dir foo.txt within a dos box just
fine. Interestingly to me, system dir; worked okay. I guess it
just won't take an
I have used Spreadsheet::WriteExcel and it works without a hitch for me,
though I just do barebones cell creation on a single worksheet, nothing
fancy at all. Still, no one has complained at all about the end result not
being usable.
-Original Message-
From: Timothy Johnson
the ? is a special character within a regular expression (which is what
the two /s inside split contain). If you want to split on the ?, you'll
have to escape it, like \?
Have a look at perldoc perlre for what regular expressions are about.
deen
On Thu, 31 Jan 2002, Darren Simpson wrote:
Thank you all for you prompt and accurate help. I will not soon forget the
difference between assigning a value and a numeric comparison operator.
Jason, with the @a=$number statement, I was trying to create the list by
changing contexts. In other words, if STDIN returns the input in a scaler
I want to slurp a file and make multiple blank lines into single blank
lines. Here is my code:
#! perl -w
use strict;
my $file = test.fmt;
open (IN, $file) or die;
open (OUT, test.txt);
my $text;
{
local $/;
$text = IN;
close IN;
}
# $text =~ s/\0{2,}/\0\0/mg; # this removes all
you want to treat $text as a single string
use
$text =~ s/\n+/\n/sg; # use /mg if you want to treat the string as multiple
lines.
-Original Message-
From: Moore, Larry [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 31, 2002 12:33 PM
To: beginners@perl. org (E-mail)
Subject:
is this scary or what? LOL :)
On Thu, 31 Jan 2002, Deen Hameed wrote:
the ? is a special character within a regular expression (which is what
the two /s inside split contain). If you want to split on the ?, you'll
have to escape it, like \?
Have a look at perldoc perlre for what regular
I thought it would be a good idea to replace a batch script
(.bat) running on a Windows 2000 with a Perl script which
is far more clever.
The original batch file setted two environment variables
which were available after running the script. That is,
if I did
c: cvs-init.bat
it has commands
For others who may want to see how module works...
Here is a snippet of code I used with the Write:Excel module... Was
written and run on WinNT without Excel installed on the box. It reads
in csv files into Excel file and then sets some limited formatting
(freeze panes and set column widths).
--- Moore, Larry [EMAIL PROTECTED] wrote:
I want to slurp a file and make multiple blank lines into single blank
lines. Here is my code:
#! perl -w
use strict;
my $file = test.fmt;
open (IN, $file) or die;
open (OUT, test.txt);
my $text;
{
local $/;
$text = IN;
I am trying to access a folder, but this folder is linking rapidly, I need your help.
Can anybady explain me why does ithappens.
It is neither possible in unix.
When you run a batch script under Win32, or 'source' a shell script under
unix, you only have 1 process, and that process is executing commands,
which set _its_ env variables.
If your fork a child process (ie. start perl to execute the perl-script),
it can only
Using O'Reilly's Learning Perl, have set up a bare bones socket
connection between two computers to send a small amount of data from the
client to the server. (For learning, not for the real world.)
The client sends are you there and the server responds with I am here,
what do you want.
Each
I am attemping to create a frequency chart based on a pipe delimited
database output. Following is what I have come up with. The hash create from
this is then output to another file. It seems to be very slow on files in
excess of ~1 lines. This will be used on ~50 line files and needs to
At 11:55 AM 1/31/02 -0500, Dave Benware wrote:
Nope. It just thinks that the name of the command you're running is dir
foo.txt. Separate the arguments explicitly, e.g.,:
C:\WINDOWSperl -e system qw(dir mouse.txt)
Yah, that works fine, tho I don't understand why. Is there some doc I
Download the Win32::AdminMisc module from http://www.roth.net/perl. The
SetEnvVar() function will do what you want. Keep in mind that while new
windows will have the new environment variables, the environment the script
is running uner will still have to be set manually using the %ENV hash or
Using O'Reilly's Learning Perl, have set up a bare bones socket
connection between two computers to send a small amount of data from the
client to the server. (For learning, not for the real world.)
The client sends are you there and the server responds with I am here,
what do you want.
Each
Using O'Reilly's Learning Perl, have set up a bare bones socket
connection between two computers to send a small amount of data from the
client to the server. (For learning, not for the real world.)
The client sends are you there and the server responds with I am here,
what do you want.
Each
# Why not ...
while( INFILE )
{
@tmp = split( /\|/ );
if (exists $freq{$tmp[$table]})
{
$freq{$tmp[$table]}++
}
else
{
$freq{$tmp[$table]}=1
}
$tot ++
}
- Original Message -
From: Balint, Jess [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent:
Hew,
I've never delved into this area at all, but looking at your code, shouldn't
you have
Proto= tcp,
in the IO:::Socket... on server as well as client?
Joe
-Original Message-
From: Hewlett Pickens [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 31, 2002 12:50 PM
To: [EMAIL
Hewlett Pickens wrote:
Using O'Reilly's Learning Perl, have set up a bare bones socket
connection between two computers to send a small amount of data from the
client to the server. (For learning, not for the real world.)
The client sends are you there and the server responds with I am
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
I know this is not a good RegEx. Can I see some criticism and fine-tuning of
this RegEx that I came up with?
Objective: To parse the path to drive, directory and file name.
Here is what I came up with.
#
$fullpath = C:/TopDir/outer/inner/file.fl;
($drive,
I am wanting to get a unix directory file listing and put it into a Perl array. I
attempted
$date = system ls -al | grep filename.txt;
However all this did was send it to STDOUT.
What am I missing?
Thanks,
Russell
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands,
Couldn't it be:
m#^([^\\/]+)(.*)([^\\/]+)$# )
At Thursday, 31 January 2002, [EMAIL PROTECTED] wrote:
I know this is not a good RegEx. Can I see some criticism and fine-
tuning of
this RegEx that I came up with?
Objective: To parse the path to drive, directory and file name.
Here is what I
Use backticks, not system().
$date = `ls -al | grep filename.txt`;
Or if you want it in an array like you mentioned, do this...
@date = `ls -al | grep filename.txt`;
Rob
-Original Message-
From: Russell Boyd [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 31, 2002 3:17 PM
To:
Hi,
My oversight, I forgot to say that this would be on my own local machine a
Win 2k box
Since I am sometimes in a text editor that has ability to launch a perl
file then: the handyness to get a url launched by using a perl script to do so
Thanks. Alan.
At 06:41 AM 1/31/2002 -0800, you
--- [EMAIL PROTECTED] wrote:
I know this is not a good RegEx. Can I see some criticism and fine-tuning of
this RegEx that I came up with?
Objective: To parse the path to drive, directory and file name.
Here is what I came up with.
#
$fullpath =
better...(assuming the filename would never have a stupid / in it)
($drive, $path, $file) = ($fullpath =~ m~(\w:)/(.*?)([^/]+)$~);
would output:
C:
TopDir/outer/inner/
file.fl
-Original Message-
From: Curtis Poe [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 31, 2002 3:39 PM
To:
In NT you can use the start command with a URL. So to start a brower
at a specific location:
system( start http://jpw3.com/search.html; );
Depending on how you have IE configured, this might start a new window.
If it doesn't and you need to use a new browser window:
system( start iexplore
1 - 100 of 122 matches
Mail list logo