Hi -

Regexs don't work against a list context (I here something's
coming in Perl 6).

So use:

 s/"//g for (@device);

(I don't think " needs to be escaped.)
This snippet removes ALL "s (g operator),
even those in the middle. For just beginning
and end:

 for (@device) {
  s/^"//;
  s/"$//;
 }

Maybe someone will tell us how to put that in
one regex.

Aloha => Beau.

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:jonathan.musto@;bt.com]
Sent: Friday, October 25, 2002 12:47 AM
To: [EMAIL PROTECTED]
Subject: Removing "s


I have a SQL statement using DBI that pulls a list of devices from a data
base column:
$device_Names->execute or die "...etc...";

I'm printing the output to a file:
my @device;
while ( @device = $device_Names->fetchrow_array()) {
    print FILE "@device\n";
}

some of the device are surrounded my quotations ie "router01".
does anyone know of a way to remove these " if they are present before i
write to the file??
i've tried using a regexp @device =~ s/\"//; before the print statement but
had no joy :-(

Any help would be much appreciated, Cheers!

Jonathan Musto



BT Ignite Solutions
Telephone - 0113 237 3277
Fax - 0113 244 1413
E-mail -  <mailto:Jonathan.Musto@;bt.com> [EMAIL PROTECTED]
http://www.technet.bt.com/sit/public <http://www.technet.bt.com/sit/public>


British Telecommunications plc
Registered office: 81 Newgate Street London EC1A 7AJ
Registered in England no. 1800000
This electronic message contains information from British Telecommunications
plc which may be privileged or  confidential. The information is intended to
be for the use of the individual(s) or entity named above. If you  are not
the intended recipient be aware that any disclosure, copying, distribution
or use of the contents of  this information is prohibited. If you have
received this electronic message in error, please notify us by  telephone or
email (to the numbers or address above) immediately.








-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to