Reg Expression Help

2006-03-23 Thread Scott Purcell
Hello, I have a regular _expression_ in which I am ensuring the user enters some valid characters for our system. Currently the _expression_ is so: '^[a-zA-Z0-9-_. ]+$' Meaning, a user can enter a-z or A-Z or 0-9, dashes, underbars or periods and space. I have a problem now,

RE: Another regular expression question

2003-03-20 Thread Scott Purcell
You could use conventional hacking. rindex will get the last '.' and substr will hand back the remainder. print extension(Base-02.04.1.20.5.002-xlite_katana_free.ndu); sub extension { return (substr($_[0], rindex($_[0], '.'))); } -Scott -Original Message- From: [EMAIL

Need to call java class and pass in args to its main

2003-01-24 Thread Scott Purcell
Hello, I have a perl script that gathers data that is needed to call a java class. I would like to call exec(thejava file) and pass it the args from the perl file. The perl script creates an anonymous array. So how can I call a java class file and pass it the args from perl? Under the perl 3rd

RE: Finding the OS type

2002-11-18 Thread Scott Purcell
Title: Finding the OS type You could try something like this: local $l_arch = $ENV{'PROCESSOR_ARCHITECTURE'}; if ($l_arch =~ /x86/ig) { return "intel"; } else { #probably some unix flavor. return getUnixType } sub getUnixType { my $osname = $^0; if ($osname =~ /aix/i)

Perl TK List?

2002-11-15 Thread Scott Purcell
Hello, I am doing a simple interface and I ran into a problem with a widget method. Is there an appropriate list to post a question on perl/TK? Thanks, Scott Purcell | Developer | VERTIS | 555 Washington Ave. 4th Floor | St. Louis, MO 63101 | T 314.588.0720 | F 314.588.0735 | [EMAIL PROTECTED