does anyone know how to compare text
ie
if ( d < e ) then do this
or
if ( z > h ) do this
thanks
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Ted
You could either send a new frameset page, which will load both new frames
you require, or you'll have to use a client side scripting language (i.e.
javascript)
Here's a link that shows one way to do it:
http://javascript.internet.com/navigation/change-2-frames.html
Carl
--
>From:
Steven Massey wrote:
>
> does anyone know how to compare text
> ie
>
> if ( d < e ) then do this
if ( 'd' lt 'e' )
> or
> if ( z > h ) do this
if ( 'z' gt 'h' )
See the perlop document for more information.
John
--
use Perl;
program
fulfillment
--
To unsubscribe, e-mail: [EMAIL PROTECTE
"Jeff 'Japhy' Pinyan" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> On Mar 27, Wytch said:
>
> >Transliteration replacement not terminated at dot.pl line 18.
> >
> >What is a Transliteration replacement?
>
> First, you've shown us NO code, so we can't help co
"Timothy Johnson" <[EMAIL PROTECTED]> wrote in message
C0FD5BECE2F0C84EAA97D7300A500D50025811D3@SMILEY">news:C0FD5BECE2F0C84EAA97D7300A500D50025811D3@SMILEY...
>
> The return value of rand() is a random number between 0 and the optional
> argument (1 by default).
>
> In this case there are 6 elem
> The problem is not the rand(). The problem was the user didn't put
> parentheses around the elements of the array assignment.
>
> @array = ("This", "That", "Those");
> print $array[rand @array];
Ah ha! those curly brackets have a lot to answer for lol! I can't believe it
was something so
"Randal L. Schwartz" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> That's correct, but if you have a very very very old Perl, you'll need
> to add "srand;" at the beginning of your program. Do it just once,
> though.
That was one of the first things I tried
"John W. Krahn" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Wytch wrote:
<<>>
> If you had warnings enabled Perl would have caught this for tou.
But I would have been none the wiser still! You have to understand that I
only started Perl two nights ago and
"James Taylor" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hrm, try this:
>
> @tea = "Meba", "Shaun", "Mark", "Jason", "Rick", "Dan";
> srand (time ^ $$ ^ unpack "%L*", `ps axww | gzip`);
> print "$tea[rand(5)]\n";
Wow - I would love to say I understand th
On Wed, 2002-03-27 at 20:40, Ahmed Moustafa wrote:
> Chas Owens wrote:
> > I wrote some experimental code and it looks like you don't have to reap
> > the children (maybe this is just a C thing).
>
> So, is it OK to fork processes without using waitpid?
>
> In general, how are the servers (from
On Wed, 2002-03-27 at 18:46, [EMAIL PROTECTED] wrote:
> Hello, All:
>
> Is there a simple way to stop perl from complaining that a variable is
> only used once (possible typo at...)? e.g.,
>
> #! /usr/bin/perl -w
> use Getopts::Std;
>
> getopts('d');
>
> print "foo" if ($opt_d);
>
>
Where in the Camel or other resource is the list of characters that
we don't want people to type in. I'm still collecting all the
resources I lost from my logic board dying. Thanks in advance.
--
---
- Teresa Raymond -
- Mariposa Net -
-
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, March 27, 2002 6:16 PM
> To: Beginners Perl Mailing List
> Subject: RE: Testing for filehandles
>
>
> On Wed, 27 Mar 2002, Bob Showalter wrote:
> > You can pass a filehandle glob to IO::Handle::o
Thank you very much for this script. I dropped in straight onto my box and
ran it beautifully.
However, I've got a couple of questions about the code.
On Wednesday 27 March 2002 6:46 pm, Randal L. Schwartz wrote:
> #!/usr/bin/perl
> use strict;
>
> use Image::Magick;
>
> my $im
Hi all,
I have some arrays and like to trigger some events depending on which
array or combination of arrays contains data. What I tried was
something like:
snippet
if(@dates && !@themes && !@cities) {
#do something with the data in @dates
}
elsif(!@dates && @themes && !@cities) {
#do so
&& and 'and' have different precendence that's the only difference, but in
your case it doesn't matter.
what exactly are you trying to do? Your code reads
if @dates has data
and the other two BOTH do not have data
then do somthing with @dates
else if the above is false and
@d
On Thu, 2002-03-28 at 09:44, [EMAIL PROTECTED] wrote:
> Hi all,
>
>
> I have some arrays and like to trigger some events depending on which
> array or combination of arrays contains data. What I tried was
> something like:
> snippet
>
>
> if(@dates && !@themes && !@cities) {
>
>
> #do some
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,
t
Hi Chas,
thanks for your reply.
The code was the simplified code of a subroutine (below). The Data
originates from a Webformula and is passed on to the Subroutine like
snippet
&extract_data(@datum, @seminare, @staedte);
..
..
..
sub extract_data {
my $dates = shift;
my $themes = sh
There in lies your problem.. you are not passing to the subroutine
correctly.
try declaring your sub like so:
sub extract_data (\@\@\@){
but if you do this don't call extract_data with &
use
extract_data(@datum, @seminare, @staedte);
or pass the ref of the arrays:
extract_data(\@datum, \@semin
> Why does this segment not work properly?
>
> $match = "cat(\d+)";
> $replace = "\1dog";
> $_ = "cat15";
> s/$match/$replace/g;
> print $_; # prints --> \1dog
>
> Any ideas?
Try replacing the "\1dog" with '${1}dog' in the line where you define
$replace. That should solve your problem.
-dav
Yes, prototypes _can_ be used here, but prototypes in general have
fallen out of favor amongst the more august members of the Perl
community because of the reasons I stated below.
Merlin, if you are reading, can you give us your opinion of prototypes?
On Thu, 2002-03-28 at 11:11, Nikola Jances
\1 is obsolete.
try $1 and you also have use the /ee
and fix your $replace for the /ee
read perldoc perlre
$match = qr/cat(\d+)/;
$replace = '$1. "dog"';
$_ = "cat15";
s/$match/$replace/gee;
print $_, "\n"; # prints --> 15dog
> -Original Message-
> From: Bryan R Harris [mailto:[EMAIL
People,
I am working in a script I would call file2port. The idea is to trail (like
tail -f) a file and send it to a TCP port. For every TCP connection incoming
to my server, I would trail a file and print its new lines to the client
peer. However, I am having two problems I would like to present
On Thu, 2002-03-28 at 10:50, Nikola Janceski wrote:
> There in lies your problem.. you are not passing to the subroutine
> correctly.
>
> try declaring your sub like so:
> sub extract_data (\@\@\@){
> but if you do this don't call extract_data with &
> use
> extract_data(@datum, @seminare, @stae
On Mar 28, Bryan R Harris said:
>Why does this segment not work properly?
You would know if you had warnings turned on.
perl -we '$match = "cat(\d+)"'
yields the warning
Unrecognized escape \d passed through at -e line 1.
>$match = "cat(\d+)";
>$replace = "\1dog";
>$_ = "cat15";
>s/$matc
Hello,
I believe that changing $0 is a security breach on some systems. The only
UNIX virus/worm that I have seen, set the argv[0] to a null string and the
process would not show in the "ps" output list. UNIX ps displays the value
of argv[0], and if this string is changed the program can fake bei
good info.. but this doesn't look like a method call.
I prefer prototypes for modules that I write for internal use at my company,
especially when I don't feel like explaining to 60 people everytime why
thier code doesn't work, when they forget to pass an extra argument.
> -Original Message-
try
if (defined @array) {
# do something
} else {
# It's not been created, do something else
}
HTH
John
-Original Message-
From: Michael D. Risser [mailto:[EMAIL PROTECTED]]
Sent: 28 March 2002 13:55
To: [EMAIL PROTECTED]
Subject: Array question...
OK here's the problem:
I
I am putting a counter on a website for the first time. I undstand that
because the server is Unix that I will need to se permission for the
counter.
I believe this can be done within the Perl script using the line:
chmod (0755, "counter.cgi");
right within the counter.cgi script itself.
Is th
On Thursday 28 March 2002 08:54 am, you wrote:
> OK here's the problem:
>
> I have an array that may or may not have been assigned to, if it has been
> assigned to I need to do one thing, otherwise I need to do something else.
>
> I've tried many variations, but I'm having trouble determining if i
On Thu, 2002-03-28 at 08:54, Michael D. Risser wrote:
> OK here's the problem:
>
> I have an array that may or may not have been assigned to, if it has been
> assigned to I need to do one thing, otherwise I need to do something else.
>
> I've tried many variations, but I'm having trouble determ
From: Teresa Raymond <[EMAIL PROTECTED]>
> Where in the Camel or other resource is the list of characters that
> we don't want people to type in. I'm still collecting all the
> resources I lost from my logic board dying. Thanks in advance.
When testing data you should ALWAYS test whether the
OK here's the problem:
I have an array that may or may not have been assigned to, if it has been
assigned to I need to do one thing, otherwise I need to do something else.
I've tried many variations, but I'm having trouble determining if it has been
assigned to.
if(undef @myArray) {
# Do
I made the column testname unique . But I did quite understand how to change
to query syntax.
Stephen told me to add where clause "Where IDENTIFIER NOT IN ( SELECT
IDENTIFIER FROM TABLE)"
I dont get what he means .. I am new to perl .
the table
show columns from phistory;
+---
> I am putting a counter on a website for the first time. I
> undstand that because the server is Unix that I will need to
> se permission for the counter.
>
> I believe this can be done within the Perl script using the line:
>
> chmod (0755, "counter.cgi");
>
> right within the counter.cgi s
From: Bill Bartok <[EMAIL PROTECTED]>
> I am putting a counter on a website for the first time. I undstand that
> because the server is Unix that I will need to se permission for the
> counter.
>
> I believe this can be done within the Perl script using the line:
>
> chmod (075
> "Gary" == Gary Stainburn <[EMAIL PROTECTED]> writes:
>> my @names = @ARGV ? @ARGV : grep { -f and -B } <*>;
Gary> I read this to say, if filenames passed use them otherwise do the whole of
Gary> the current directory. I believe that the grep takes the list provided by
Gary> <*> perform
While you're looking up "my", look up 'use strict'. It'll be much easier on
you if you get used to using it now than if you have to go back over all of
your old scripts.
-Original Message-
From: Wytch [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 28, 2002 3:26 AM
To: [EMAIL PROTECT
On Thu, 2002-03-28 at 12:26, FLAHERTY, JIM-CONT wrote:
> I made the column testname unique . But I did quite understand how to change
> to query syntax.
> Stephen told me to add where clause "Where IDENTIFIER NOT IN ( SELECT
> IDENTIFIER FROM TABLE)"
>
> I dont get what he means .. I am new to
Here is a subroutine that prints strings to a file. I want the routine
to write strings to the file in the format
Question1:factor(x^2+4*x+3)=(x+3)*(x+1).
However, what is written to file is
Question1:factor(x^2+4*x+3)
=(x+3)*(x+1), that is,
a newline before the = sign. Is there some way of inhib
There must be something else going on. Tried just going to the screen and it
worked like one would expect.
Can you show the list a snippet of your code? What system are you on? What
perl?
Wags ;)
-Original Message-
From: richard noel fell [mailto:[EMAIL PROTECTED]]
Sen
Hey folks,
Executive summary: It looks like, no matter what context foo() is called
in, its arguments are always evaluated in list context. Is this correct?
I had always understood that:
- a function's arguments were evaluated in the same context as the
context of the function (hmm...ac
Try removing the newline at the end of your question with a call to chomp.
else{
for (my $i=1; $i<=$#qk+1;$i++){
chomp ($Question_hash{$qk[$i-1]});
print In1
"Question"."$i".":factor$Question_hash{$qk[$i-1]}=$Answer_hash{$ak[$i-1]}\n";
}
>Here is a subroutine that prints strings to a file.
Hi!,
How does one convert html:
to a Perl?
$value_1 = T1;
Thanks,
Jerry
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
What is the best way to create a unique, almost impossible to guess,
KEY, i.e., ftu880oli88UI8flpq, which can in turn be used as part of a
security string, i.e., username: ftu880oli88UI8flpq ?
Thanks in advance.
Gregory
Uh... exactly what are you going to be using it for?
You might want to check out the function call crypt() in the perlfunc pages.
> -Original Message-
> From: Gregory Matthews [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 28, 2002 2:30 PM
> To: [EMAIL PROTECTED]
> Subject: Creating a
uuidgen can create a nearly 100% unique key, but if the attackers has
access to the machine it was generated on and knowledge of the
approximate time the key was generated then it is fairly easy to
guess/reverse engineer the key. You may want to look into using a very
large prime number or some s
This might be simple, but I haven't found a solution yet. I have a
script that I use on our Unix boxes that uses 'find' to get a list of
files in a certain directory that are a certain number of days old and
removes them from the system (find / -name * -mtime +45 -exec rm -rf {}
\;). I need to p
Write a really cool subroutine for File::Find
or I can give you an example to work from I recommend perl V5.6.1+ if
you are going to use File::Find
> -Original Message-
> From: Scott Burks [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 28, 2002 2:56 PM
> To: [EMAIL PROTECTED]
> Su
Nikola Janceski wrote:
> Uh... exactly what are you going to be using it for?
> You might want to check out the function call crypt() in the perlfunc
pages.
>
> > -Original Message-
> > From: Gregory Matthews [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, March 28, 2002 2:30 PM
> > To:
Jeff, David, Nikola-I obviously haven't been doing this long, but I
already love perl. Thanks for the tips.
A couple quick questions:
- Why is the \1, \2, etc. syntax obsolete? The one thing I love about
regular expressions is that I can use them within text editors (nedit,
textpad, bbedi
On Mar 28, Bryan R Harris said:
>- Why is the \1, \2, etc. syntax obsolete? The one thing I love about
>regular expressions is that I can use them within text editors (nedit,
>textpad, bbedit), but none of these support the $1 notation in the replace
>string. Why aren't re's consistent between
On Thu, 28 Mar 2002, Bob Showalter wrote:
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> > Thanks, Bob! After reading the IO::Handle man page, I decided
> > to distill this approach a bit further:
> >
> > print F if fileno(F);
>
> Of course, that's even simpler! Just to be nitpicky,
>Perl 6 Beginners list <[EMAIL PROTECTED]>
^^^ ahem?
At 11:13 AM 3/28/02 -0800, Dave Storrs wrote:
>Executive summary: It looks like, no matter what context foo() is called
>in, its arguments are always evaluated in list context. Is this correct?
Unless a prototype overrides it, yes.
remember when calling a subroutine with & prepended, prototypes are never
looked at.
> -Original Message-
> From: Peter Scott [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 28, 2002 3:32 PM
> To: Dave Storrs; Perl 6 Beginners list
> Subject: Re: context of function calls
>
>
>
> >P
Hello, All:
I've never been very good at scoping so it it's no surprise that this
confuses me:
When declaring variables at the beginning of a script, what is the
difference between 'my' and 'use vars'?
--
Eric P.
Los Gatos, CA
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additiona
I'm using Mail::IMAPClient to write a mail filter via IMAP.
I'd like to connect to the server using SSL.
The instructions in the man page don't help me:
$imap=Mail::IMAPClient->new(User => $user, Password => $pass, Server =>
$host);
# blah blah blah (doc's blah blah blah, not mine!)
$imap->Socket
OK I have the following array
@new which has the following data in it
this town
this state
zipcode
county
fips (I want discarded)
Area code
And want to insert these vars into my DB
I'm using this code:
#!/usr/bin/perl -w
use LWP::Simple;
use DBI
Hi!,
I am trying to display an jpg image:
print "";
But it tells me that the file is not found? What am I missing?
Thanks,
Jerry
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Someone mailed me off list and pointed out that the url I posted had been wrapped. I
also noticed that I had given a url I had bookmarked which is a mirror of the document,
not the official site. There is some other related material there and postscript and
html
versions in addition to the pdf
Looks like you need to declare my $dbh, my $action, my $passwd up where
you've declared the others or just turn off strict.
To debug your database statement try: die $action to see what the script is
sending to the database
-Original Message-
From: Michael Gargiullo [mailto:[EMAIL PROTEC
On Thu, 2002-03-28 at 14:55, [EMAIL PROTECTED] wrote:
> Hello, All:
>
> I've never been very good at scoping so it it's no surprise that this
> confuses me:
>
> When declaring variables at the beginning of a script, what is the
> difference between 'my' and 'use vars'?
>
> --
> Eric P.
>
Your html tag is misformatted for starters.
try
print " ";
or
print " ";
I have no idea if the image is actually there, however :)
Regards,
Agustin Rivera
Webmaster, Pollstar.com
http://www.pollstar.com
- Original Message -
From: "Jerry Preston" <[EMAIL PROTECTED]>
To: "begginners"
ok I declared the vars and now I'm getting a different type of error:
DBD::Sybase::db do failed: Server message number=170 severity=15 state=1
line=1 server=WHITETAIL text=Line 1: Incorrect syntax near 'new'. at
../zip.pl line 36.
Can't call method "execute" on an undefined value at ./zip.pl line
"Agustin Rivera" <[EMAIL PROTECTED]> wrote in message
000d01c1d6a3$f7e83c50$9865fea9@agustinr">news:000d01c1d6a3$f7e83c50$9865fea9@agustinr...
> Your html tag is misformatted for starters.
>
> try
>
> print " ";
> or
> print " ";
>
> I have no idea if the image is actually there, however :)
Actu
You're right. I was thinking when I deemed a
valid tag.
"Agustin Rivera" <[EMAIL PROTECTED]> wrote in message
000d01c1d6a3$f7e83c50$9865fea9@agustinr">news:000d01c1d6a3$f7e83c50$9865fea9@agustinr...
> Your html tag is misformatted for starters.
>
> try
>
> print " ";
> or
> print " ";
>
> I h
I've made a perl script available for downloading, and would appreciate
any code review from anyone so inclined. The script emulates a legacy C
program (1982, named biblio), and is a command-line driven personal
bibliographic manager. Perhaps needless to say, the functions are
anacronistic, and
excuse my curiosity, but what was the purpose in re-implementing the
program?
you end up with something that runs slower and you need to distribute a
runtime engine.
unless you plan to extend functionality...
On Thursday, March 28, 2002, at 02:52 PM, ERIC Lawson - x52010 wrote:
>
> I've made
Ok, and where are the recommended characters to disallow? I have
tested and I know which characters are going through but I would like
to make sure I've included most of the recommended list.
>From: Teresa Raymond <[EMAIL PROTECTED]>
>
>> Where in the Camel or other resource is the list of ch
Richard Noel Fell wrote:
>
> Here is a subroutine that prints strings to a file. I want the routine
> to write strings to the file in the format
> Question1:factor(x^2+4*x+3)=(x+3)*(x+1).
> However, what is written to file is
> Question1:factor(x^2+4*x+3)
> =(x+3)*(x+1), that is,
> a newline befo
Scott Burks wrote:
>
> This might be simple, but I haven't found a solution yet. I have a
> script that I use on our Unix boxes that uses 'find' to get a list of
> files in a certain directory that are a certain number of days old and
> removes them from the system (find / -name * -mtime +45 -ex
"Agustin Rivera" <[EMAIL PROTECTED]> wrote in message
002201c1d6a9$4e8cec40$9865fea9@agustinr">news:002201c1d6a9$4e8cec40$9865fea9@agustinr...
> You're right. I was thinking when I deemed
a
> valid tag.
lol.. I guessed that was the case and felt a bit guilty after pressing the
send button...
On Thu, 28 Mar 2002, bob ackerman wrote:
> excuse my curiosity, but what was the purpose in re-implementing the
> program? you end up with something that runs slower and you need to
> distribute a runtime engine. unless you plan to extend
> functionality...
This is a good question, but one I can
At 03:39 PM 3/28/02 -0500, Nikola Janceski wrote:
>remember when calling a subroutine with & prepended, prototypes are never
>looked at.
And also on method calls.
--
Peter Scott
Pacific Systems Design Technologies
http://www.perldebugged.com
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For add
At 02:52 PM 3/28/02 -0800, ERIC Lawson - x52010 wrote:
>I've made a perl script available for downloading, and would appreciate
>any code review from anyone so inclined.
Okay, here are a few comments.
>my $interspace = 1; # 0 or 1 line: space between references
>my $linespace = 1;
> The script and associated files (a manual
> page in groff, postscript, and PDF; a
> manifest and a GPL license file; [snip]
Any reason for the GPL license, e.g. derived
work of a GPL'd program? The freer Artistic
license is more common to the Perl community,
I guess because some clever cookie
When a file is transferred via FTP, when is the EOF character added to
the file (only at the end of transmission or also during the transferring)?
Your help will be appreciated so much.
--
Ahmed Moustafa
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PRO
>From within perl:
> -Original Message-
> From: Scott Burks [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 28, 2002 11:56 AM
> To: [EMAIL PROTECTED]
> Subject: Find Files Based on Age
>
>
> This might be simple, but I haven't found a solution yet. I have a
> script that I use on o
>From within perl using built-in functions:
$modification_time = (stat($file))[9]; # seconds since epoch
$time = time; # now
$age = $time - $modification_time; # age in seconds
Gary
> -Original Message-
> From: Scott Burks [mailto:[EMAIL PROTECTED]]
> Sent:
In an array say @randomWord
The second position could contain one of a thousand words, but the words all
end with a comma. How can I strip that comma?
I've tried using:
$_=$randomWord[1];
/(.*.),/;
$randomWord[1] = $_;
But this is not working, any sugestions?
-Mike
--
To unsubscribe, e-ma
81 matches
Mail list logo