able match.
So if $date contained:
Thu Jun 5 10:04:03 CDT 2003
$1 would contain '10'.
$2 would contain '04'.
$3 would contain '03'.
Hope this helps.
-
Frank Wiles <[EMAIL PROTECTED]>
http://fra
k need an outbound
SMTP server to relay their E-mail through. This mostly due to the
dial-up nature/roots of the Internet. Since the "client" wasn't
going to be online 24/7 it needed to drop off the E-mail on an SMTP
server so that the server could repeatedly try to
use File::Find;
my $count = 0;
find(\&wanted, @INC);
sub wanted {
if( $_ =~ /\.pm$/ ) {
print "$count: $File::Find::name\n";
$count++;
}
}
-----
Frank Wiles <[EMAIL PROTECTED]
following it would work as expected:
perl -e '@NEW = split(/\./, "1.2.3"); print "x", $NEW[1], "x\n"; '
The forward slashes denote the start/end of the pattern and the
backslash says to use a literal period as oppose
ar, you'll want to
modify this to be:
($match) = $num =~ /(\d)$/;
or if there is always there characters you can also do this:
($match) = $num =~ /\d\d(\d)/;
-----
Frank Wiles <[EMAIL PROTECTED]>
ed at this much, but I'm betting it has to do with
the fact you use several different my'ed versions of the scalar
'$sheet' throughout. Try naming them something unique based upon
what they hold and I bet you'll work your own problem out.
---
similar concepts to
sequential and random access files. They aren't much like GW Basic
however.
I would suggest reading up on on your Perldoc for open() and sysopen(),
probably reading the Perl Cookbook would be a good idea to get a better
PeerAddr' => 'xxx.xxx.xxx.xxx',
'PeerPort' => '209',
'Proto' => 'udp')
or die "cannot connect: $!\n";
print $sock "$ARGV[0]\r\n";
$sock->close();
.--[ Frank Wiles wrote (2003/02/28 at 16:20:37) ]--
|
| .--[ Tyler Longren wrote (2003/02/28 at 16:15:27) ]--
| |
| | I found that if I change $data to "12345678", it works. How can
| | I encrypt a string that has more than 8
ions
together for you.
-----
Frank Wiles <[EMAIL PROTECTED]>
http://frank.wiles.org
-
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
my $first_field = substr($data, $offset, 10);
$offset += 10;
my $second_field = substr($data, $offset, 15);
$offset += 15;
my $third_field = substr($data, $offset, 40);
$offset +=40;
}
-
Frank Wiles <[EMAIL P
a way to do this all at once?
|
| $_=~s/($\s+)||(\s+^)||(\$)//g foreach (@fields);
| I have also tried
| $_=~s/[($\s+)(\s+^)(\$)]//g foreach (@fields);
|
`-
Try this regex instead:
s/(?:^\s+|\$+|\s+$)//g
--
x27;m assuming you are wanting to remove all entries in @data that
begin with a space, this will do it in one line:
@data = map( { if( $_ !~ s/^ //) { $_; } }, @data);
-
Frank Wiles <[EMAIL PROTECTED]>
http://fran
$list =~ s|/$name||;
$list =~ s|^/||;
If it's at the end, it will remove the last /.
If it's in the middle it will fill in correctly.
If it's on the front the second regex will take care of it.
---------
Frank Wiles <[EMAIL PROT
my $first_line = ;
close(IN);
-----
Frank Wiles <[EMAIL PROTECTED]>
http://frank.wiles.org
-
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
like to have available to
the @letters array such as symbols, numbers, etc. You can adjust the
length by changing the for ( 1 ... 8 ) to say for ( 1 ... 10 ) to
make it 10 characters long.
-
Frank Wiles <[EMAIL PROTECTED]>
http://frank.wi
prefix_file . $log ;
|
| $probefile = " ) {
}
You might want to re-read perldoc -f open.
-----
Frank Wiles <[EMAIL PROTECTED]>
http://frank.wiles.org
-
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
my $localtime_minus_two = localtime($day_two);
I hope that makes sense.
-
Frank Wiles <[EMAIL PROTECTED]>
http://frank.wiles.org
-
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
keeping it in memory, or being out
of date as the operating system will handle both of those issues for
you automagically.
-----
Frank Wiles <[EMAIL PROTECTED]>
http://frank.wiles.org
-
--
To unsubscribe, e-mail: [
nnot write to the location it is
trying to install to then make install will fail.
-----
Frank Wiles <[EMAIL PROTECTED]>
http://frank.wiles.org
-
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
ormats. Or see perldoc -f format or man perlform for more info.
-----
Frank Wiles <[EMAIL PROTECTED]>
http://frank.wiles.org
-
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
If you have variables or special characters ( i.e. \n, \t, etc )
in a string enclosed by ""s then they will be replaced with their
values. If you have them enclosed in ''s they will be used
literally.
Hope that helps.
-
location you are
trying to install to. So if you did:
perl Makefile.PL PREFIX=/System/Library/Perl/
You'll need write permission in /System/Library/Perl.
Not being a Mac OS X user, is /System/Library/Perl the default
library location?
--
which is /home/sean/ you'll need to do the
following:
perl Makefile.PL PREFIX=/home/sean/
make
make install
Then you will not need root/admin privileges, you will however need
to modify @INC to know to look in the directory you choose for the
library.
----
bytes" it's simply saying seek
to size - 2 which happens to be 2 bytes before the end.
Does that make sense?
-----
Frank Wiles <[EMAIL PROTECTED]>
http://frank.wiles.org
-
--
To unsubscribe, e-mail: [EM
the Cookbook for more info on
using seek().
-
Frank Wiles <[EMAIL PROTECTED]>
http://frank.wiles.org
-
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
e and black for Halloween you end up only modifying
HTML templates and not having to muck with and possibly re-debug your
Perl CGIs.
Hope this helps.
-----
Frank Wiles <[EMAIL PROTECTED]>
http://frank.wiles.org
---
directory'. So the
example was trying to say '/home/user/perl_practice/myfile' by using
the '~/perl_practice/myfile' shortcut.
You'll need to expand the ~ on your own if you want it to be useful.
-
some point no matter what is contained in the file
3) Make sure the contents of the file you are reading have values
for all possible fields/values/etc.
Hope this helps.
-
Frank Wiles <[EMAIL PROTECTED]>
http://frank.wiles.org
--
X' . $second . '' . $third;
my @new_array = split(/\s/, $new_str);
This is probably not the most optimal way to handle this, but it
should have the desired result.
-----
Frank Wiles <[EMAIL
t change unless it is
reset by a user. As for setting it you'll want to look into the
program /bin/nice.
-----
Frank Wiles <[EMAIL PROTECTED]>
http://frank.wiles.org
-
--
To unsubscribe, e-mail: [EMAIL
x27;foobar';
This sets hash1's value at key '2' to 'foobar'.
Or am I misunderstanding your question?
-----
Frank Wiles <[EMAIL PROTECTED]>
http://frank.wiles.org
-
| Subject:Re: compar
( keys(%hash1) ) {
if( $hash1{$key} ne $hash2{$key} ) {
print "hash1: $hash1{$key} hash2: $hash2{$key}\n";
}
}
-----
Frank Wiles <[EMAIL PROTECTED]>
http://frank.wiles.org
--
^binaries\\/o ) {
push(@array2, $file);
}
else {
push(@array3, $file);
}
}
NOTE: The 'o' on the end of the regular expression matches instructs
the perl interpretor to only compile the regex once, as it doesn't
change during
ement just before $res->nameservers($nameserver1) and
print out $nameserver1 to make sure there is data in that hash
position.
-
Frank Wiles <[EMAIL PROTECTED]>
http://frank.wiles.org
-
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Hope this helps.
-----
Frank Wiles <[EMAIL PROTECTED]>
http://frank.wiles.org
-
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
like a standard file.
Hope this helps.
-----
Frank Wiles <[EMAIL PROTECTED]>
http://frank.wiles.org
-
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
works, this
may not even be possible. However to for an easy way to get every
third day I would suggest you look at Date::Calc or Date::Manip
modules on cpan.org as they have several easy functions for working
with dates.
-
Frank Wiles <[EMAIL P
be careful, as you can easily blow away your system if
you do a rm -rf /
-----
Frank Wiles <[EMAIL PROTECTED]>
http://frank.wiles.org
-
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
ore easily ported, etc?
-----
Frank Wiles <[EMAIL PROTECTED]>
http://frank.wiles.org
-
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
);
You'll probably want to read up on Perl references in the perlref
man page.
-
Frank Wiles <[EMAIL PROTECTED]>
http://frank.wiles.org
-
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
.
You say that if you remove from the line up and from the line down
it works. See if it works if you remove just the 111th line. If it
works then, then there is something different about that line that
is causing your code to error.
-----
Fran
le to do with Net::SMTP. I would suggest
you take a look at MIME::Lite, it makes it very very easy.
-
Frank Wiles <[EMAIL PROTECTED]>
http://frank.wiles.org
-
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For
ich are local to some subroutines that are traversed
recursively it might take Perl that long to back out all of the way
free()'ing as it goes.
---------
Frank Wiles <[EMAIL PROTECTED]>
http://frank.wiles.org
-
--
ement: $DBI::errstr\n";
| $dbh1 ->disconnect();
| print "\n\n *** LOGGED OUT OK \n\n";
| exit;
|
`-
You'll need to make sure that CRON has all the same environment
variables and is running as the same user
fine where the data and temp files should go.
I'm not familiar with Windows so I wouldn't be much help there.
-----
Frank Wiles <[EMAIL PROTECTED]>
http://frank.wiles.org
-
--
To unsubscribe, e-mail: [EMAIL
.
-
Frank Wiles <[EMAIL PROTECTED]>
http://frank.wiles.org
-
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
I would first suggest taking another look at your table design.
Having 500 columns in a table is most likely not a thing you
really want to do.
But if you must, then yes you will have to put in 500 ?'s into
your prepare.
-
Frank Wiles &l
ally delete the unused files ?
> Any help would be greatly appreciated
Use the unlink() function. perldoc -f unlink
-----
Frank Wiles <[EMAIL PROTECTED]>
Revolution Systems, LLC.
-
--
To unsubscribe, e-m
pt as:
$ARGV[0] = 'file1'
$ARGV[1] = 'file2'
$ARGV[2] = 'file3'
You may also want to look into using Getopt::Std or Getopt::Long to do
more interesting commandling arguments handling.
-
Frank Wile
s it will launch 5 Perl interpretors. You can avoid this by using
mod_perl which shares the interpretor inside of Apache itself.
---------
Frank Wiles <[EMAIL PROTECTED]>
Revolution Systems, LLC.
-
--
To unsubscribe,
t <>'s as data because they would
need to be < and > if the HTML is valid.
Hope this helps.
-
Frank Wiles <[EMAIL PROTECTED]>
Revolution Systems, LLC.
-
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
er words, can you replicate the export functionality of a UNIX shell
> script using PERL?
You can always set enviromental variables, just like a shell. However,
depending on the application this can cause some pretty serious security
issues.
--------
code change for readability and reducing the amount
you have to type. Try:
while( my ($id, $name, $par, $time) = $sth->fetchrow ) {
}
Instead of 'my'ing each variable.
You might also try putting the start_html() outside of the while{} block
and just loo
54 matches
Mail list logo