Hello all, need a little help.
I have an input variable such as ARGV which equals something like
/use/home/name/script/test.dat
I need to be able to get just the "test.dat" (i.e. the file name) at the end of the directory and the directory can be anything and any length. To put it another... (3 Replies)
I have a string of data that looks like this:
private.enterprises.954.1.1.1.1.1.2618 \(OctetString\): U private.enterprises.954.1.1.1.1.2.2618 \(OctetString\): 2618
I am trying to parse the string to only return the values after the ":". Ex from above "U" and "2618".
Any suggestions? (5 Replies)
Hi,
I am wondering if there's a simpler way to extract the second occurrence of a word enclosed in that matches my search criteria.
Sample Input is as follows:
Error installing feature - com.er.nms.cif.ist.NoMatchingUpgra
Error installing feature -... (4 Replies)
Hi Guys,
I spend half a day getting this to work with no luck, perhaps you guys can help..
I have a string from a file looking like this:
module::name=test::type=generic_data::exec=snmpget.......::desc=A Little Test::interval=300
what I would like to split it, so I get a value for each... (3 Replies)
I'm working in korn shell and have a variable which contains a string like:
aa_yyyymmdd_bbb_ccc_ddd.abc. I want to treat the _ and . as delimiters and parse the string so I end up with 6 values in variables that I can manipulate. My original plan was to use
var1=`echo $sting1 | cut -c1-c2` but... (9 Replies)
Hi, I need to parse a string, check if there are periods and strip the string.
For example i have the following domains and subdomains: mydomain.com, dev.mydomain.com
I need to strip all periods so i have a string without periods or domain extensions: mydomain, devmydomain.
I use this for... (12 Replies)
I've a problem parsing a string as a command:
Consider script stefano.sh as following:
#!/usr/bin/sh
txtshell="./parser.sh /ews/MyEventHandler/data/handler/StopAndMail.php eventid=StopAndMail.MVIN.6300 lot_number=1122FXB facility=EWSF3 'mailto=prova.prova@nohost.com, prova.test@nohost.com'... (2 Replies)
Hi,
I would like to be able to parse out a substring matching a basic pattern, which is a character followed by 3 or 4 digits (for example S1234 out of a larger string). The main string would just be a filename, like Thisis__the FileName_S1234_ToParse.txt. The filename isn't fixed, but the... (2 Replies)
Hi Perl Guys
I have another perl question
I have the following code that i have written
Getopt::Long::config(qw( permute bundling ));
my $OPT = {};
GetOptions($OPT, qw(
ver=s
help|h
)) or die "options parsing failed";
This will allow the user to do something like... (4 Replies)
Discussion started by: ab52
4 Replies
LEARN ABOUT DEBIAN
mail::message::construct::text
Mail::Message::Construct::Text(3pm) User Contributed Perl Documentation Mail::Message::Construct::Text(3pm)NAME
Mail::Message::Construct::Text - capture a Mail::Message as text
SYNOPSIS
my $text = $msg->string;
my $text = "$msg"; # via overload
my @text = $msg->lines;
my @text = @$lines; # via overload
my $fh = $msg->file;
my $line = <$fh>;
$msg->printStructure;
DESCRIPTION
Complex functionality on Mail::Message objects is implemented in different files which are autoloaded. This file implements the
functionality related to creating message replies.
METHODS
The whole message as text
$obj->file()
Returns the message as file-handle.
$obj->lines()
Returns the whole message as set of lines. In LIST context, copies of the lines are returned. In SCALAR context, a reference to an
array of lines is returned.
$obj->printStructure([FILEHANDLE|undef],[INDENT])
Print the structure of a message to the specified FILEHANDLE or the selected filehandle. When explicitly "undef" is specified as
handle, then the output will be returned as string.
The message's subject and the types of all composing parts are displayed.
INDENT specifies the initial indentation string: it is added in front of each line. The INDENT must contain at least one white-space.
example:
my $msg = ...;
$msg->printStructure(*OUTPUT);
$msg->printStructure;
my $struct = $msg->printStructure(undef);
# Possible output for one message:
multipart/mixed: forwarded message from Pietje Puk (1550 bytes)
text/plain (164 bytes)
message/rfc822 (1043 bytes)
multipart/alternative: A multipart alternative (942 bytes)
text/plain (148 bytes, deleted)
text/html (358 bytes)
$obj->string()
Returns the whole message as string.
Flags
SEE ALSO
This module is part of Mail-Box distribution version 2.105, built on May 07, 2012. Website: http://perl.overmeer.net/mailbox/
LICENSE
Copyrights 2001-2012 by [Mark Overmeer]. For other contributors see ChangeLog.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See
http://www.perl.com/perl/misc/Artistic.html
perl v5.14.2 2012-05-07 Mail::Message::Construct::Text(3pm)