Sudarshan Raghavan <[EMAIL PROTECTED]> had this to say,
>
> Did you look at the code that I posted at the end of my last mail?
I'm so embarrassed! I totally missed it!
Wow. This is just what I'm looking for. I'm going to try it out - but
it will have to wait until morning (it's 2315 here, a
On Mon, 3 Mar 2003, Deb wrote:
> Here's the modified script. I made some changes, as suggested, but there
> was no change in the output. I've included my entire script. My head is
> getting mighty flat from banging it against the wall. Oh, and I added "use
> warnings;" and I haven't got a clu
(H, this should have been posted, but I don't see it - sorry if this
actually becomes a double-posting...)
Here's the modified script. I made some changes, as suggested, but there
was no change in the output. I've included my entire script. My head is
getting mighty flat from banging it ag
Here's the modified script. I made some changes, as suggested, but there
was no change in the output. I've included my entire script. My head is
getting mighty flat from banging it against the wall. Oh, and I added "use
warnings;" and I haven't got a clue what I need to do to fix those.
I'd
John wrote:
> Did you try the code I posted Friday? (Message-ID: <[EMAIL PROTECTED]>)
John,
Thanks, yes, I did. But, the syntax was new to me, and I've been reading
up on it. I couldn't really get it to do what I want (see my previous
post to this one). But, that's probably b/c I didn't expl
Deb wrote:
>
> Okay, I'm still struggling.I just cannot seem to get my mind to
> stop, look, and listen. Here's some code I'm working on:
Did you try the code I posted Friday? (Message-ID:
<[EMAIL PROTECTED]>)
John
--
use Perl;
program
fulfillment
--
To unsubscribe, e-mail: [EMAIL PRO
> Okay, I'm still struggling.I just cannot seem to get my mind to
> stop, look, and listen. Here's some code I'm working on:
> - 8-<
> use strict;
You might also want to add a use warnings after use strict and check how
y
On Mon, 3 Mar 2003, Deb wrote:
> Okay, I'm still struggling.I just cannot seem to get my mind to
> stop, look, and listen. Here's some code I'm working on:
>
> - 8-<
> use strict;
> my %cmdLine;
> my $DBG = 1;
>
> while (
On Mon, 3 Mar 2003, Scott R. Godin wrote:
>
> my @scores;
> my @files = glob "/home/johann/smail/Spam/*";
> foreach my $file (@files) {
> open(IN, "<", $file) or die "Cannot open file $file: $!";
> while () {
> next unless /^Subject:/;
> push @sco
Okay, I'm still struggling.I just cannot seem to get my mind to
stop, look, and listen. Here's some code I'm working on:
- 8-<
use strict;
my %cmdLine;
my $DBG = 1;
while () {
chomp;
my ($adx, $rest) = (spl
From: "Voodoo Raja" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: Capture Proccess ID's under win32 (findwin.exe)
Date: Tue, 04 Mar 2003 09:15:56 +1200
does anyone have the findwin.exe module where I can capture the proccess id
for a specific program.
Or any other which one has simila
Thanks a lot for this - these different example have been a lot of help and
a valuable education :)
Anadi
From: "Todd Wade" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: Re: is there a 'more perl' way of doing this
Date: Mon, 3 Mar 2003 19:51:01 -0500
"Anadi Taylor" <[EMAIL PROTECTED]> wrot
"Anadi Taylor" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi all,
> I have to start by thanking you all for your help so far - its been
> invaluable. If it were'nt for you guys and gals i would have pulled my
hair
> out by now !
>
> OK - here is the thing: I have written som
WOW thanks all - a bit of information overload there but a lotta learning so
thank you
Anadi
_
Surf together with new Shared Browsing
http://join.msn.com/?page=features/browse&pgmarket=en-gb&XAPID=74&DI=1059
--
To unsubscribe
Diego Aguirre wrote:
>
> Hello,
Hello,
> I have just learned opening and reading a file, with
>
> open (HoyIn,"File.txt");
What would happen if for some reason the file could not be opened? You
should ALWAYS verify that the file opened correctly.
> @rgstr=;
> foreach $linea (@rgstr)
> {
>
From: "Luinrandir Hernsen" <[EMAIL PROTECTED]>
To: "Anadi Taylor" <[EMAIL PROTECTED]>
Subject: Re: please please comfirm (was Parsing variables)
Date: Mon, 3 Mar 2003 18:53:19 -0500
> I might be barking up the wrong tree here but I have never seen
> querystring information seperated by semi colon
"Scott R. Godin" wrote:
>
> use Quantum::Superpositions;
>
> my @notinarray1 =
> map { $_ }
^^
> eigenstates( any(@Array2) ne all(@Array1) );
>
> my @notinarray2 =
> map { $_ }
^^
> eigenstates( any(@Array1) ne all(@Array2) );
Gidday All,
With a view to accessibility we are limiting our publishing of PDFs on our site. We
tend to replace and pdfs by creating HTML pages by cutting and pasting from the PDF to
our CMS.
Is there a automated way of deconstructing a pdf using PERL.
Thanking you in advance
Colin Johnsto
"Beau E. Cox" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi -
>
> > -Original Message-
> > From: Guy P [mailto:[EMAIL PROTECTED]
> > Sent: Monday, March 03, 2003 9:10 AM
> > To: [EMAIL PROTECTED]
> > Subject: Backslash in a string
> >
> >
> > Hello,
> > My Perl program e
Jeff Westman wrote:
This will work (thanks)
Tell me, is there a way to cross-reference the file handle to the variable I
am using? Suppose I have something like
open(IN, "< $myFile)
Can I do some kind of system call to see what variable name is associated
with 'IN'?
Alternatively, I gu
Hi Dan.
Dan Muey wrote:
> If you can call a subroutine without parenthesis is that faster than
> with them or does it not matter?
>
> Example
>
> $time = localtime;
> or
> $time = localtime();
>
> is there a difference speedwise/peformace wise/portability wise or
> any wise at all?
Nowise. The pa
Thank you for your help but I want to learn this too
Here is the code from the HTML GET
North
West
And here I think is the CGI code
$input=$ENV{QUERY_STRING};
@pairs = split(/&/, $input);
foreach $pair (@pairs)
{
($name, $value)=split(/=/,$pair);
$form
Hello,
I have just learned opening and reading a file, with
open (HoyIn,"File.txt");
@rgstr=;
foreach $linea (@rgstr)
{
print $linea ;
}
close (HoyIn);
I want read the file from -lets say- the fifth line on. Any help, pls?
Forhp Shiottr J.
>
> If you don't mind using the IO::Handle module then it provides an
> 'opened' method. Otherwise you may want to have a look at its source,
> or check out
>
> perldoc -f fileno
>
> Which is all the 'opened' method does...
This will work (thanks)
Tell me, is there a way to cross-refer
If you can call a subroutine without parenthesis is that faster than with them or does
it not matter?
Example
$time = localtime;
or
$time = localtime();
is there a difference speedwise/peformace wise/portability wise or any wise at all?
Jeff Westman wrote:
Isn't there a perl function to test if a file is already open? I could have
sworn I used one called "isopen()" or "ifopen()" -or- am I getting
confused with a similar function in C?
If there isn't such a function, how would one test if a file is already open?
If you do
Uh.. What's the problem?
Are you getting an error of some kind?
Are you having problems querying a database?
A little context/code you're using might help.
There is no conflict with having slashes in a string that is stored in a variable so
You may want to expound a little more.
DMuey
> Hello,
You could also use cpan's autobundle feature:
% perl -MCPAN -e shell
cpan> autobundle
Then get the systadmin to mail you the file. The snapshot built by
autobundle is very useful as you can then use that to get cpan to
install all the modules on another machine for you.
To see how CPAN build's
Hi -
> -Original Message-
> From: Guy P [mailto:[EMAIL PROTECTED]
> Sent: Monday, March 03, 2003 9:10 AM
> To: [EMAIL PROTECTED]
> Subject: Backslash in a string
>
>
> Hello,
> My Perl program execute a query that bring back into a variable a Windows
> paths initially stored in a databas
Johann Snyman wrote:
> Hello there,
>
> I am a newby trying to learn pearl. I wrote my first little script,
> and I would love to se where I could have done things better (in a
> more proffesional way).
>
> Feedback would be appreciated!
Well you are off to a good start with lines two and three
Randal L. Schwartz wrote:
[snip]
> John> Use the File::Find module.
>
> John> perldoc File::Find
>
> I have many examples of this module (including a two-parter that
> recently appeared in Linux Magazine) on my site. Google
> for
>
> site:stonehenge.com "File::Find"
>
> for the examples.
Philipp Gruemmer wrote:
> A small correction (thanks to Carlos Diaz)
>
>> Isn't shis code supposed to read the first line of the @input array then
>> read the first line of the @blacklist array, see if the $line contains a
>> $cond and then ptrint "true". After that it should carry on with the
>>
Todd W wrote:
>
> "Paul" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>> This is too fun, and so occupies far to much of what should otherwise
>> be a productive workday.
>>
>> Alas, I must unsubscribe again.
>>
>> *sigh*
>>
>> Later, all. :)
>>
>
> You can point your news reade
Dave K wrote:
>
>> Greetings!
> Hello
>>
>> I'm trying to do some Perl for a non-profit organization. The computer
>> administrator doesn't know very much about Perl or about the server.
>> If I were to ask him what Perl modules were available, he'd probably
>> just have to call somebody else an
Hello,
My Perl program execute a query that bring back into a variable a Windows
paths initially stored in a database. I have got problems to manage the
backslash.
Example:
Here's what is stored in the database -->
\Directions\unit\progr\sourcsql
I would like to get it in a variable thus I could
Hello,
My Perl program execute a query that bring back into a variable a Windows
paths initially stored in a database. I have got problems to manage the
backslash.
Example:
Here's what is stored in the database -->
\Directions\unit\progr\sourcsql
I would like to get it in a variable thus I could
Yannick,
$ perl -e '
> %ch = (h1 => {}, h2 => {});
> for (keys %ch) {
> print"$_\n";
> }'
h1
h2
> Hi,
Hello,
> I'm just trying to make a structure with a hash containing some
> references to other (yet unused) hashes.
see above.
>
> So what I wrote this:
>
> $intHash1Ref = {};
> $intHash2Ref =
does anyone have the findwin.exe module where I can capture the proccess id
for a specific program.
Or any other which one has similar capabilities
Thanks
Sam
_
The new MSN 8: advanced junk mail protection and 2 months FREE*
http
Hi -
> -Original Message-
> From: Paul Kraus [mailto:[EMAIL PROTECTED]
> Sent: Monday, March 03, 2003 10:09 AM
> To: [EMAIL PROTECTED]
> Subject: Programs - Flow Charts
>
>
> Does anyone use flow charts to help them with program design. What
> software tools do you use to put down what y
Well it depends. Is this script on windows or unix?
I'm thinking unix due to the program name.
Can you do the same thing via the command line?
User~ # echo "\cN\cN\c]]Bc]]Bc]]B\cN\cNc]]B\cN\cZ" | lrp
If not then piping that to them won't work either.
Also if that does work you may save your self
No no no, don't do it by hand. There's to many things to keep track of,
use the CGI module it handles all the messy details for you and do it better
than anything you can write ( no offense ;p ) ::
use CGI qw/:standard/;;
$var = param('var');
$monkey = param('monkey');
print header();
print "You
Tao Wang wrote:
> Hi Everyone,
> I'm trying to parse lines of macros definitions as
> following:
>
> AV $(G)/er $(M)/q $(T)/w/f
> Gter/eee
> M$(W)
> Tg/ee/fet
> W$(AV)
>
here is another way of doing it:
#!/usr/bin/perl -w
use strict;
my $code =<<'CODE';
AV $(G)/er $(M)/q
Thanks to all for the replies.
The purpose of the line was to parse an input from a form. I could
explain my reasons for using that method.. but every time I have tried
to word it clearly... it came out all confusing... suffice it to say
that you were all a big help. I have worked it out.
I chang
Hallo
I need simple parsing code for a "get" not a "post".
that will yeild 4 or 5 variables.
Lou
#I know I need to get rid of the "&"
# Split the name-value pairs
@pairs = split(/&/, $ENV{'QUERY_STRING'});
foreach $pair (@pairs)
{
# Split the pair up into individual variables.
Does anyone use flow charts to help them with program design. What
software tools do you use to put down what you want from a program
before you begin to code. Or even the phases you go through before you
start to code.
Paul Kraus
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional comm
thanks a lot. I'll try. :)
--- "Beau E. Cox" <[EMAIL PROTECTED]> wrote:
> Hi Tao,
> > -Original Message-
> > From: tao wang [mailto:[EMAIL PROTECTED]
> > Sent: Saturday, March 01, 2003 9:49 AM
> > To: [EMAIL PROTECTED]
> > Subject: how to detect a circular macro by using
> perl
> >
> >
>
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]
Hi Anadi.
Anadi Taylor wrote:
> Hi all,
> I have to start by thanking you all for your help so far - its been
> invaluable. If it were'nt for you guys and gals i would have pulled
> my hair out by now !
>
> OK - here is the thing: I have written some code and it works fine
> (yah), but i w
Isn't there a perl function to test if a file is already open? I could have
sworn I used one called "isopen()" or "ifopen()" -or- am I getting
confused with a similar function in C?
If there isn't such a function, how would one test if a file is already open?
Jeff
__
Anadi Taylor wrote:
> Hi all,
> I have to start by thanking you all for your help so far - its been
> invaluable. If it were'nt for you guys and gals i would have pulled
> my hair out by now !
>
> OK - here is the thing: I have written some code and it works fine
> (yah), but i was wonderi
## check to see if username or email already exist
($errmesseml, $errmessuser, $emailuserfound) = "False";
$errmesseml = "True" if ($dbemail eq $email);
$errmessuser = "True" if ($dbusername eq $membusrname);
## create readable error message
$errmessage = undef;
($errmesseml eq "True")?(
On Mon, 03 Mar 2003 18:50:35 +, Anadi Taylor wrote:
> OK - here is the thing: I have written some code and it works fine
> (yah), but i was wondering if there is a more 'PERL' way of doing things
> as this code looks bulky to me
>
> the code id:
>
> ## check to see if username or
Madhu Reddy wrote:
> Hi,
>I want to find out how to pass perl variables
> between files and functions...
> in C, we declare with "extern" to work in different
> files how to do in perl...
> between files means , i declare variable in file1 and
> file2 will update those variables and want t
Hi all,
I have to start by thanking you all for your help so far - its been
invaluable. If it were'nt for you guys and gals i would have pulled my hair
out by now !
OK - here is the thing: I have written some code and it works fine
(yah), but i was wondering if there is a more 'PERL' wa
>
> I don't know of any Perl solution off the top of my head
> (check out CPAN), I instead use xPDF which includes a command
> line utility pdftotext.
>
> http://www.foolabs.com/xpdf/about.html
Exactly what you need!!
Now all you have to do is figure out what command line command you'd
use to
I don't know of any Perl solution off the top of my head (check out CPAN), I
instead use xPDF which includes a command line utility pdftotext.
http://www.foolabs.com/xpdf/about.html
Rob
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Monday, March 03, 2003 12:5
> 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");
Yes $pdf_guts
> Hello everyone.
Howdy
>
> I'm trying to write a script for Uploading pictures.
>
> Can you give me some advice??
> What module to look at first??
use CGI;
See the documentation at cpan.
Things I've found are ::
- upload the file before any headers are printed
- don't forget to make your
The CGI module can be used for this. Here is a short example which might
(or might not) help. Also check out the perldoc for CGI, or better yet take
a look at the "Official Guide to Programming with CGI.pm", a book published
by Wiley.
# the Perl code
use CGI qw(:standard);
my $file = $R
Hello everyone.
I'm trying to write a script for Uploading pictures.
Can you give me some advice??
What module to look at first??
Thank you.
-rm-
--
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
oops..mistake!!
$intHash1Ref = {'A' => 'B'};
$intHash2Ref = {'C' => 'D'};
%containerHash = ('hash1' => $intHash1Ref, 'hash2' => $intHash2Ref);
foreach my $hashRefKeys (keys %containerHash) {
my $hashRef = $containerHash{$hashRefKeys};
foreach my $hashKeys (keys %{$hashRef} ) {
pr
You may want to handle them as
$intHash1Ref = {'A' => 'B'};
$intHash2Ref = {'C' => 'D'};
%containerHash = ('hash1' => $intHash1Ref, 'hash2' => $intHash2Ref);
foreach my $hashRefKeys (keys %containerHash) {
foreach my $hashKeys (keys %{$containerHash{$hashRefKeys}} ) {
print $hashKeys
Yannick Warnier <[EMAIL PROTECTED]> writes:
> Hi,
>
> I'm just trying to make a structure with a hash containing some
> references to other (yet unused) hashes.
>
> So what I wrote this:
>
> $intHash1Ref = {};
> $intHash2Ref = {};
>
> %containerHash = { hash1 => $intHash1Ref, hash2 => $i
Hi,
I want to find out how to pass perl variables
between files and functions...
in C, we declare with "extern" to work in different
files how to do in perl...
between files means , i declare variable in file1 and
file2 will update those variables and want to access
in file1
Ex: like $var1 a
That's what I thought too, that's why I asked where STDIN was coming from.
Always a bad idea to parse the input yourself because, as you found,
Different OS/perl versions/protocals/etc... May need different parseing
Methods.
But CGI is modular and platform independent and quite easy to use ::
P
Your syntax is a little off...
$intHash1Ref = {};
$intHash2Ref = {};
# note use of parens, not curly braces
%containerHash = (hash1 => $intHash1Ref, hash2 => $intHash2Ref);
The parens store a list into %containerHash, the curly-braces were storing a
hash-ref.
Rob
-Original Message-
Fro
> "David" == David Gerler <[EMAIL PROTECTED]> writes:
David> in my script I have a subroutine that begins with this line...
David> my @stuff = split(/&/,);
My crystal ball says "it's a CGI protocol handler".
To which I must reply "don't use that, use CGI.pm". Please.
--
Randal L. Schwar
Is there an issue running perl under linux xinetd where xinetd is
listening for connections on a UDP port and then forking the following
perl code. When I do this, the perl code does not see any input on
STDIN. How does one get at the data received on the socket
by xinetd?
Roger
while () {
> Hello all,
>
> I have a script that I have been working on with perl builder
> and win2000. I have it working correctly at this point on the
> win 2000 machine. Although, I am not finished, I wanted to do
> a test on the server at this point to make sure everything is
> working correctly...
Hello,
I have three files, for two different cites. The first file contains
names of men with their faves, in columns. The second file is the same
but for their partner. The third file is a list of similar partners
(partner selection based on data fed into a perl script):
FILE_1 and FILE_2 column
Hi,
I'm just trying to make a structure with a hash containing some
references to other (yet unused) hashes.
So what I wrote this:
$intHash1Ref = {};
$intHash2Ref = {};
%containerHash = { hash1 => $intHash1Ref, hash2 => $intHash2Ref};
Then when I try to have a list of keys to that contai
Hello all,
I have a script that I have been working on with perl builder and win2000. I have it
working correctly at this point on the win 2000 machine. Although, I am not finished,
I wanted to do a test on the server at this point to make sure everything is working
correctly... That is where m
HEllo list four quick questions ::
# 1) is there a CGI way to grab the scheme fo a url ??
with uri you can do $scheme = $uril->schem($url); but I may need a way to do it
with CGI without doing a regex or split at the ':'
$self_url = self_url();
# 2) which way is faster the CGI way or the
On Mon, 3 Mar 2003 06:01:01 -0800 (PST), Rob Richardson <[EMAIL PROTECTED]> wrote:
> I am now expanding one of my favorite sayings:
> "C++ gives you thousands of ways to shoot yourself in the foot. Visual
> Basic hides all the ways it shoots you
> Dan Muey wrote:
>
> > I have a need to grab specific Mime sections of an array.
> >
> > I've looked at and tried different Mime Modules but can't
> seem to get
> > it to go. I thought about parsing it manually but I'm not sure if
> > every message will be formatted exactly the same, hence th
It should do exactly what you need, I do this routinely.
The following is a very basic sample, but might help get you started.
use File::Find;
# calls wanted() for each file found
find(\&wanted, '/var/log');
sub wanted
{
# check to see if the file exists, could be
# used instead to skip b
>
> At 04:01 PM 3/1/2003 +, Anadi Taylor wrote:
> >Hi all,
> >
> >I have written a script that reads in information from a database:
> >name,
> >email, password and username.
>
>
>
> >Also: the only reason I am having to pull all this data from
> the mySql
> >database is because for some
Greetings!
A few days back, I posted a message in which I asked for help figuring
out why Perl was reporting that an array had one element when printing
the array showed all 17 elements that it was supposed to have. I took
a closer look at my entire application last night. I thought I had
been r
Hello Jeroen.
Jeroen Lodewijks wrote:
>
> I have a question. I have a sub which build a hash of list values.
> I want to put those list values directly into some local variables
> but I am unable to get the syntax right.
>
> I have something like this at the moment:
>
> sub FillHash
> {
>my($d
Hi:
In the process of load-testing an ftp server, we hit upon this error "Bad
File Descriptor". On searching some mailing lists, I found that this could
be because of ftp timeouts / problems with the remote file handle in ftp.
Is there a way to get more detail on the actual error / exception?? Bad
Hi,
I have a question. I have a sub which build a hash of list values.
I want to put those list values directly into some local variables but I am
unable to get the syntax right.
I have something like this at the moment:
sub FillHash
{
my($db) = @_;
my (%formatrules);
my $lcs
Hi,
function Win32::AdminMisc::GetFileInfo( $file, \%Attribute)
is retrieving several subhashes:
at key LangID we have 0x0409
at key Language we have English (United
at key FileInfo we have HASH(0x1dbb690)
at key Comments we have
at key 0x0409 we have HASH(0x1dbb714)
How do I access the informati
On Mon, 3 Mar 2003, Kristian Rink wrote:
>
> Hi there, and thanks for the hint...
>
> > On Mon, 03 Mar 2003 12:11:51 +0100, Kristian Rink wrote:
> [snip]
> > The easiest way is nearly always to use the existing module
> > File::Find
> > for handling recursive directory/file structures.
>
> I'm
Hi there, and thanks for the hint...
> On Mon, 03 Mar 2003 12:11:51 +0100, Kristian Rink wrote:
[snip]
> The easiest way is nearly always to use the existing module
> File::Find
> for handling recursive directory/file structures.
I'm by now trying to figure out about what File:Find is capable of
On Mon, 03 Mar 2003 12:11:51 +0100, Kristian Rink wrote:
> .. I'm trying to handle directories and files using recursion and some perl
> cookbook
> recipes. Basically, it all comes down to a script fragment like this:
> [snipped the rest]
The easiest way is nearly always to use the existing modul
Hi all,...
.. I'm trying to handle directories and files using recursion and some perl
cookbook
recipes. Basically, it all comes down to a script fragment like this:
sub strip_directory
{
my $currentpath=$_[0];
print $currentpath;print "\n";
opendir(SOURCE, $currentpath) || die
87 matches
Mail list logo