One way is to make a custom sorting function. You pass it a list of items
and it goes through the list and compares each via the variables $a and $b.
You make the function return -1 if $a is "smaller than" or "before" $b, 1 if
$a is "bigger than" or "after" $b, or 0 if they are tied. In this case
If you want to put nothing in a known number of $digit variables, you can
match nothing to overwrite them with the nothing you matched:
"" =~ /()()()/;
Cheers,
-L
>-Original Message-
>From: [EMAIL PROTECTED]
>[mailto:[EMAIL PROTECTED] Behalf Of
>[EMAIL PROTECTED]
>Sent: Tuesday, May 18,
You can find out the reason OUT is not opening as you expect by replacing
this:
open(OUT,">$outFile");
with this:
open(OUT,">$outFile") or die "Cannot open OUT: $!";
>-Original Message-
>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
>Sent: Tuesday, February 18, 2003 3:20 PM
>To: Pe
Oops, the fingers don't type so well this early in the morning... I meant
\n, not \\n.
>-Original Message-
>From: Einecker, Leah [mailto:[EMAIL PROTECTED]]
>Sent: Friday, October 04, 2002 9:14 AM
>To: 'Terry Vaughn'; [EMAIL PROTECTED]
>Subject: RE: [Per
perl -e 'open IN, "){s/\~/\\n/g;print;}' >
Newfile.txt
>-Original Message-
>From: Terry Vaughn [mailto:[EMAIL PROTECTED]]
>Sent: Friday, October 04, 2002 8:59 AM
>To: [EMAIL PROTECTED]
>Subject: [Perl-unix-users] replace "~" with \n
>
>
>Hello.
>
>Can anyone tell me a quick way to replace
You could use something like this:
open MYFILE, "<$filename" or die "can't open the file: $!";
foreach $one_line ()
{
push (@lines, $one_line) if $one_line =~ /\S/;
}
close MYFILE;
# now only the non-blank lines are in @lines
Cheers,
-L
-Original Message-
From: Craig Sharp [mail
Hi!
Have you tried using $ftp->site()?
"site (ARGS)
Send a SITE command to the remote server and wait for a response.
Returns most significant digit of the response code." (Net::FTP perldoc)
If that doesn't work, you may be able to get it working as $ftp->quot():
"quot (CMD [,ARGS])
Send