comp.lang.perl.misc
  Home FAQ Contact Sign in
comp.lang.perl.misc only
 
Advanced search
April 2008
motuwethfrsasuw
 123456 14
78910111213 15
14151617181920 16
21222324252627 17
282930     18
2008
 Jan   Feb   Mar   Apr 
 May   Jun   Jul   Aug 
 Sep   Oct   Nov   Dec 
2008 2007 2006  
total
comp.lang.perl.misc Profile…
RELATED GROUPS

POPULAR GROUPS

more...

 Up
  tricky use of print?         


Author: Ela
Date: Apr 1, 2008 23:57

I found that little can be done on debugging a variable on print, after
visiting a page containing the module PadWalker.

I wonder whether in Perl can do something like:

$newline = '\n'

print
foo
$foo

print $newline;

I use the vim editor, in this sense, rapid coding and debugging can achieve.
But i at least know that the newline trick doesn't work...
6 Comments
  ID3v2 cover art insertion with Perl?         


Author: Seppo Ingalsuo
Date: Apr 1, 2008 23:21

Hi,

I'm struggling with my flac->mp3 music library maintenance script. based
on some net articles I have used MP3::Tag to attach cover art this way

use constant HEADER => ( chr(0x0) , "image/jpeg" , chr(0x0), "");

$img = new Image::Magick;
if (! $img->Read("$flacdir/cover.jpg")) {
$id3v2->add_frame( "APIC", HEADER, $img->ImageToBlob(magick => 'jpg'));
}

There is also setting

MP3::Tag->config("id3v23_unsync_size_w" => "TRUE");

See e.g. http://perl.thiesen.org/scripts/id3image

But I get corrupted cover art images in Amarok. iTunes and Windows Media
Player seem to work with it. MediaTomb uPnP server + PS3 doesn't find
the pictures. I'd like to get MediaTomb that uses taglib for metadata to
work.
Show full article (1.28Kb)
3 Comments
  RE Perl Pattern matching         


Author: Deepan Perl XML Parser
Date: Apr 1, 2008 22:23

Hi,
I am having a string say $str, the value of it is as
below:

HTTP/1.1 200 OK



int.juniper.net">DOCFGJEAKNOMBLHCGEMOIMBA





private


deflate


text/html


Wed, 26 Mar 2008 04:48:16 GMT


Concealed by Juniper Networks Redline EX header>

ASPSESSIONIDSQDCBDBA=DOCFGJEAKNOMBLHCGEMOIMBA; path=/


chunked


Accept-Encoding, User-Agent
Show full article (2.00Kb)
7 Comments
  TieRegistry with IPConfig         


Author: Cosmic Cruizer
Date: Apr 1, 2008 19:17

I'm trying to remotely look at the NIC cards on W2K3 servers that I have
admin accounts on. When I run the following it gives me an error:

use strict;
use Win32::IPConfig;

my $ipconfig;
my $host = "some IP address"; # Changed the IP address for posting
$ipconfig = Win32::IPConfig->new($host); # This is where it fails when
ran with admin account.
print "hostname=", $ipconfig->get_hostname, "\n"; # This is where it
fails when ran without admin account.

This happens with admin account
C:\NIC>nic.pl
Can't use an undefined value as an ARRAY reference at
C:/Perl/site/lib/Win32/TieRegistry.pm line 720.

This happens without using admin account (It's not first getting
Win32::IPConfig->new($host))
C:\NIC>nic.pl
Can't call method "get_hostname" on an undefined value at C:\\NIC\nic1.pl
line 7.
Show full article (1.06Kb)
no comments
  Can I iterate through a file on a CGI page?         


Author: Rich Grise
Date: Apr 1, 2008 18:05

Apologies to Perl purists - comp.infosystems.www.authoring.cgi doesn't
work on my newsreader, and this is a CGI question:

What I want to do is, I've got a large collection of image files:
$ wc gallery-pix
37448 62619 3218967 gallery-pix

and what I'd like to do is look at each of the 37488 image files on
some kind of page, with buttons like "Keep", "Skip", and "Quit",
so I can page through all of these images, which are strewn all
over the Samba server, and decide which ones might look good on
the website.

So, is it possible to do something like (in pseudocode):

for each $line in {
show webpage with tag, and the three buttons;
get button response, decide what to do with file;
if button == "Quit", save place in source file;
next;

or so?

Thanks,
Rich
18 Comments
  FAQ 8.14 How do I modify the shadow password file on a Unix system?         


Author: PerlFAQ Server
Date: Apr 1, 2008 18:03

This is an excerpt from the latest version perlfaq8.pod, which
comes with the standard Perl distribution. These postings aim to
reduce the number of repeated questions as well as allow the community
to review and update the answers. The latest version of the complete
perlfaq is at http://faq.perl.org .

--------------------------------------------------------------------

8.14: How do I modify the shadow password file on a Unix system?

If perl was installed correctly and your shadow library was written
properly, the getpw*() functions described in perlfunc should in theory
provide (read-only) access to entries in the shadow password file. To
change the file, make a new shadow password file (the format varies from
system to system--see passwd for specifics) and use pwd_mkdb(8) to
install it (see pwd_mkdb for more details).

--------------------------------------------------------------------
Show full article (1.45Kb)
no comments
  What is best CMS - SilverStripe, Joomla or Drupal         


Author: Mayuri.4469
Date: Apr 1, 2008 15:50

Hi,

I am a student of ICT and doing my final project of website
development.

I wants to do coding in PHP & MySql. I am confused about the Content
Management System.

Which CMS is good for using & reliable SilverStripe, Joomla or Drupal?

Cheers
Mayuri
4 Comments
  Good documentation or good source examples for Image::Magick or converter from commandline to perl         


Author: nntpman68
Date: Apr 1, 2008 14:23

Hi,

Normally CPAN documentation is quite good.

However I'm having some problems with ImageMagick.

Could anybody point me to some good concise documentation.

Reading the Imagemagick documentation and guestimating how to pass the
same parameters to the perl equivalemt is not always simple:

Example:

Assume following ImageMagic command:

convert -size 64x64 xc:transparent -pointsize 10 -draw "text 0,20
'hello'" test.png

I'd like to do the same in perl:

my $g = Image::Magick->new;
$g->Set(size=>"64x64");
$g->ReadImage('xc:transparent');
$g->Draw( primitive => 'text', BUT_WHAT_IS_THE_SYNTAX_HERE_???? );
$g->Write("test.png");

and don't really know where to look.

Any hint / document is welcome

bye
Show full article (0.74Kb)
9 Comments
  FAQ 8.21 Where do I get the include files to do ioctl() or syscall()?         


Author: PerlFAQ Server
Date: Apr 1, 2008 12:03

This is an excerpt from the latest version perlfaq8.pod, which
comes with the standard Perl distribution. These postings aim to
reduce the number of repeated questions as well as allow the community
to review and update the answers. The latest version of the complete
perlfaq is at http://faq.perl.org .

--------------------------------------------------------------------

8.21: Where do I get the include files to do ioctl() or syscall()?

Historically, these would be generated by the h2ph tool, part of the
standard perl distribution. This program converts cpp(1) directives in C
header files to files containing subroutine definitions, like
&SYS_getitimer, which you can use as arguments to your functions. It
doesn't work perfectly, but it usually gets most of the job done. Simple
files like errno.h, syscall.h, and socket.h were fine, but the hard ones
like ioctl.h nearly always need to hand-edited. Here's how to install
the *.ph files:

1. become super-user
2. cd /usr/include
3. h2ph *.h */*.h
Show full article (2.21Kb)
no comments
  Chop vs Chomp         


Author: zoomcart.com
Date: Apr 1, 2008 08:14

Hello, and thanks in advance for your help. I have code (below) used
for adding emails from a user textbox to a flat file. The user is
asked to separate emails with a carriage return. Some times they will
use 2 carriage returns. The code is designed to separate emails by
returns, remove returns and then add them before writing. It is not
working perfectly. Some times chopping the last letter off, sometimes
not removing carriage returns. I'm sure there is a better way to do
this. Any help is appreciated.
Show full article (1.15Kb)
5 Comments
 
1 2