@a= qw (68 3 5 67 54 23 69 );
@b = sort {-1} @a; ### what happens here !
results = 5,3,68,67,69,23,54
@c = sort {$a<=>$b} @a; ### what happens here !
results = 3,5,23,54,67,68,69
I know that sort by default sort in ascii order, I wanted to know what
exactly happens to the "spaceship" operator.
New Page 1< i'd like to know another way to do it, or another approach to reading the
info from the databse file
If I read you correctly, your datafile starts with : and ends with ø , therefore your
data file would look like this :-
:This is the first dataø
:This is the second dataø
:This is
To search inside a file, I believe you must open that file.
Try this :-
#!/usr/bin/perl -w
open (FILE, "yourfile.any_ext");
@getdata = ;
print "content-type: text/plain\n\n";
if (grep /yourmatch/, @getdata) {
print @getdata;
} else {
print "Sorry ! couldn\'t find your match in the
Hi,
I need some clarification :-
Q1)Can I use the split function to split an existing array (with several elements
) such as the example below.
Q2)Could it be that the split function can only be used to split a scalar (one
element).
Q3)Could someone explain to me the reason why @
Yes you can! use activestate from http://activestate.com/
- Original Message -
From: "pc" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, November 03, 2001 8:54 PM
Subject: Without modifications
> I need to learn how to program CGI applications on a Unix box. However, I
> wo
Hi
The script below does not do what I want which is to search a guestbook for
a particular word and if that word appear, to show the records. Currently,
after the script is run, it returns a blank page. I've confirmed that the
fault lies with statement 1, in other words, if I replace statement1