hmm... can't help you more than this :(
The new "if" only enters on GBStandardHTML() if
$in{'Field2'} isn't empty. It seems that was what
you have pretented, but I don't know enough on the
inner structure of your code...
cya
--
pkiller
one example: remove all paragraphs, the contains
the text "old material" on all html files under
"web_pages"
$ find web_pages -name \*.html -type f |
xargs perl -i -p -e 'BEGIN{undef $/}
s/<p>[^<]*old material[^<]*//sg'
--
pkiller
first of all, it might cause a lot of confusion having
a user named "Pkiller" other (different) named "PKiller"
and also "pkiller".
another aspect to take into account, is the mail.
in most implementations, mail is case insensitive,
so a pkiller@foo.bar is...
you can use find and perl. find will search the files
you want. perl will change their contents.
for instance, suppose you want to change all
paragraphs "<p>this is a paragraph" to
"<p>this is another paragraph" on all your
html files under your current directory:
$...
do a little changes on the if's.
that is, currently, you have (on the http:// part)
this:
if ($vars_gen{'Field2Data'} eq "url") {
if (($in{'Field2'} eq "") || ($in{'Field2'} !~ /http...
turn this into:
if ($vars_gen{'Field2Data'} eq "url"
and...
Actually, currently it is sorting by the whole line
on a lexical way.
You must pass a hand-made function to sort, that splits
and compares your field.
For instance, sort by second field (array pos 1):
replace "@ODB=sort(@old_list);" by:
@ODB=sort {@aa=split /\|/, $a...
Sure it's possible.
You must quote the path (with double quotes, for instance):
use lib "/home3/mysite/public_html/modules";
Or:
BEGIN { push @INC, "/home3/mysite/public_html/modules" }
...
cya
--
pkiller
Tracy, you are not correct.
Your RE will left on $part1 upto the first dot,
not including it. My RE will left on $part1 upto
the last dot, not including it.
If there is a dot on the searched expression, both
REs will always left something on $part1 and $part2.
The original problem, was...
hi again,
if the sendmail is indeed being correctly invoked,
then the only visible problem on your script, is
this piece of code (at the start):
for (@data){
push(@body,$$_{1}.'--'.$$_{0}.'\n');
}
the "$$_{1}" seems rather strange to me.
what are you trying to do? on the...
that's not a problem of perl itself (your code is ok),
but a problem regarding the data you are feeding to
sendmail.
you are using the form "sendmail recipient" and also
specifying on the head "To: ...".
Try only one of them:
1. using the "-t" flag for...
try this script:
while (<>) {
@a=split /:/;
@b=split " ",$a[4];
$x{$b[0]}++;
push @{$z{$b[0]}},$a[4]
}
for (keys %x) {
$x{$_}>1 or next;
print join("\n",@{$z{$_}}),"\n";
}
if this is on file "run.pl", then run as ...
your missing the "import module" clause, is this case,
you should import time:
# cat x
import time
day = time.strftime("%d", time.gmtime(time.time()))
print day
# python x
20
--
pkiller
I don't know what the function "sendmail()" does,
but I'll bet you are passing uncorrectly the argument %mail.
try: sendmail(\%mail);
otherwise, you will be passing a flat list with
all key-values unrolled.
--
pkiller
yes, the dot must be quoted for work on a regular expression.
also, the concatenation string operator in perl is "."
and not "+" (the later is true for java or python).
So, you need this:
$part2 = '.' . $secondword;
Also, a more direct way to do it, might be...
if using a plain old shell script, to access from the 10th
argument up, you must use shift. For instance, to print
the first 3 lines of every file passed, with a litte
header:
while test $# -gt 0; do
echo "==== $1 ===="
sed 3q "$1"
shift
done
also, the...
you must do
$ ./configure && make
try first to do a :
$ ./configure --help
to see if some options are good for you.
to check your current library version, try:
$ ls -al /lib/libc.* /usr/libc.*
and check the names of the files (libc.so.1.2.3 for example)
cya
--
pkiller
to cyberson: the memset and the loop are very closely like solutions. The actually difference, is that memset
usually is optimized with assembly, and/or loop unrolling techniques, but a simplistic, not ansi-correct, not bad-arg passing proof, implementation would be:
void memset(void *x, int...
use the return value from scanf, or else you might
be caught on an infinite loop (if the format is not
suitable to the scanf fmt string):
for (;;) {
lstptr = (INPUT*) malloc(sizeof(INPUT));
if (fscanf(textfile,"%s %s %s %s", lstptr->field0, lstptr->field1...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.