Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: bluegroper
  • Content: Threads
  • Order by date
  1. bluegroper

    Howto block email from Mailchimp

    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...
  2. bluegroper

    Connect to SQL Server

    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...
  3. bluegroper

    ALTER TABLE

    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)
  4. bluegroper

    Simple newbie help

    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...
  5. bluegroper

    How to install Number::Format ?

    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)...
  6. bluegroper

    Insert without duplicates ?

    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...
  7. bluegroper

    What does this do ??

    $|++; What does this instruction do in perl ? I tried Mr Google, but its useless. TIA's
  8. bluegroper

    Bounce emails correctly

    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...
  9. bluegroper

    Newbie perl number format

    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
  10. bluegroper

    Perl and dates

    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...
  11. bluegroper

    Perl and excel

    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...
  12. bluegroper

    Newbie help with sed

    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
  13. bluegroper

    Help with simple cgi ?

    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...
  14. bluegroper

    Help with GD ?

    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...
  15. bluegroper

    Help with smbclient

    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...
  16. bluegroper

    Keep copy of all email ?

    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
  17. bluegroper

    Small syntax problemo

    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...
  18. bluegroper

    What does " 1; " mean ?

    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
  19. bluegroper

    Newbie basic help

    Whats a nicer way to write line 1 of this snippet ? my $version = `basename $0`; chomp $version; $version = "$version vx.x"; print "$version\n"; TIA's
  20. bluegroper

    Help with CPAN

    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')"...

Part and Inventory Search

Back
Top