Hi forum
We like and have been using Postfix in our small business for many years.
We have a small~ish list of sender domains that we reject using the usual details in /etc/postfix/sender_access and the following line in /etc/postfix/main.cf
smtpd_sender_restrictions = check_sender_access...
Hi forum
Newbie here, so please be gentle.
I'm trying to connect to an SQL Server using Perl (of course).
Works fine IF my SQL database name is SINGLE word.
I'd like to also connect to database name which includes space.
But rather than rename the database, I'm sure there's a better way to write...
Hey forum
This should be easy but I have PBKAC.
Can annybody please help me with correct syntax ?
rate is presently varchar(15), need (25).
TIA's
ALTER TABLE phonecalls ALTER COLUMN rate TYPE varchar(25)
Hi forum
I have simple code snippet as below.
It works, but I'd like to learn a better way to write the 2 next statements on 1 line.
Something like
next if ($filename eq ".") OR if ($filename eq "..");
(thinks I canna find the right places for brackets)
or
next if ($filename eq "[.|..]");
Much...
Hi forum
I try to install popular CPAN module Number::Format, bet get errors.
How should I proceed ??
Many TIA's
----------- Details below this line --------------
[root@server]# perl -MCPAN -e "install Number::Format"
CPAN: File::HomeDir loaded ok (v0.80)
CPAN: Storable loaded ok (v2.13)...
How to insert a record making sure there's no duplicate ?
INSERT INTO invoices (invoiceid, billed) VALUES ('12345', 'TRUE')
WHERE NOT EXISTS (SELECT * FROM invoices WHERE invoices.invoiceid = '12345')
I keeps getting an error message and can't figure out how to do this ?
Syntax error at or...
I have a small perl based web application that sends emails when required, using a simple hook to the sendmail command.
Outgoing emails travel via a relay mailserver.
If the "To:" address is invalid, the bounce message comes back to the webmaster, or apache@domain.com, based upon the...
Hey forum
I'm using the following to format some numbers :
$data=sprintf("%.2f",$data);
How do I also include commas after every 3 digits from the right of the values in $data ?
Much TIA's
I have a small perl project that reads some data from an excel file. One of the strings needed is a date.
Excel gives perl the date as 39261, ie days since 1/1/1900.
Is there an easy way for perl to change 39261 into 6/30/2007 or 30/6/2007?
Sure there's plenty of perl "date" modules, but...
I'm trying to use perl (on linux) to read/write some excel files, that are also accessible to windoze clients using samba.
Tried using cpan and
install DBD::Excel
but I gets these errors :
Base class package "Spreadsheet::ParseExcel::Workbook" is empty.
(Perhaps you need to 'use' the...
Hey forum
I've not used sed much.
When I pipe a text file to
| sed -n '4,$p'
What does sed actually do to the file ?
man sed did not help me at all.
TIA's
I’m trying to learn a little about perl and cgi.
Ok to create an html form to execute a .cgi file with following line :
print `ls -al $directory`;
($directory is param from html form)
Works fine.
Now trying to use `print grep $searchtext $directory`
But just keep getting obscure permission...
Hi team
GD newbie here, pls be gentle.
I have the following code snippet.
$xpos = 5;
$ypos = ($height - $f->height)/2;
$gd->fill(0,0,$bgcolor);
$gd->rectangle(0,0,$w-1,$h-1,$black);
$gd->string($f,$xpos,$ypos,$mesg,$black);
my $image = $gd->png();
Is there an easy way to CENTER the $msg within...
Hi forum
I'm trying to copy all files from a linux directory, to a directory on a remote windoze computer.
I can do it one file at time without bother.
smbclient //workstation/drivec -Uuser%password -c 'lcd /directory; cd temp\directory; put filename.ext ; exit'
But it borks if I try to copy...
Hi forum
I need to get a mailserver to keep a copy of each and every mail message that is handled.
Send copy to mail-archive@domain.etc would be OK.
Can postfix do that ?
Or do I have to invoke some arcane procmail command to do this ?
TIA's
- BG
This works
$dbh=DBI->connect("dbi:Pg:dbname=$dataset;host=127.0.0.1;", "$username", "$password") or die $DBI::errstr;
This DOESN’T work
$temp=qq|"dbi:Pg:dbname=$dataset;host=127.0.0.1;", "$username", "$password"|;
$dbh=DBI->connect($temp) or die $DBI::errstr;
Can anybody tell me where my...
What does 1; mean in perl ?
Amusing how its impossible to google for "1;" :smile:
Does 1; mean exit; ??
Or does 1; mean return to the calling module ?
TIA's
- BG
I'm trying to install Text::Iconv module and have done the usual perl -MCPAN -e shellfollowed by
install Text::IconvBut then I get an error that I don't know how to fix.
8< <Snip><Snip>
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')"...
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.