Sponsored Content
Top Forums Shell Programming and Scripting Perl : converting file to different scalar elements Post 302962349 by Don Cragun on Saturday 12th of December 2015 03:03:12 PM
Old 12-12-2015
Hi scriptscript,
You said you had code that was close to working, but you needed help with the REs. Since the code Ranga and looney suggested doesn't meet your needs, please show us what you have tried and maybe we can then help you tweak your code get what you want.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

perl scalar variable in backquoted string

hi I've been searching all over the internet to simply do the following: $tempfile = "/usr/school/tempfile.dat"; $myvar = param('add'); ###add is the variable assigned to a popup menu `ls -l $myvar * >> $tempfile` ###I also tried `ls -l ${myvar}* >>$tempfile` open(ADDLIST,... (6 Replies)
Discussion started by: mehdi9
6 Replies

2. Shell Programming and Scripting

scalar variable assignment in perl + { operator

When reading over some perl code in a software document, I came across an assignment statement like this $PATH = ${PROJECT}/......./.... In this particular form of scalar variable assignment, what does the curly braces operators do ? Also, what is the benefit in doing scalar assignment this... (3 Replies)
Discussion started by: JamesGoh
3 Replies

3. Shell Programming and Scripting

Perl - New line in array elements

Hello, I have a comma delimited input feed file. The first field has directory location and the second field has file name. Ex of input feed: /export/appl/a,abc*.dat /export/appl/b,xyz*.dat /export/appl/c,pmn*.dat Under each directory, there would be many files like... . . .... (4 Replies)
Discussion started by: bperl
4 Replies

4. Shell Programming and Scripting

[Perl] Accessing array elements within a sed command in Perl script

I am trying to use a script to replace the header of each file, whose filename are stored within the array $test, using the sed command within a Perl script as follows: $count = 0; while ( $count < $#test ) { `sed -e 's/BIOGRF 321/BIOGRF 332/g' ${test} > 0`; `cat 0 >... (2 Replies)
Discussion started by: userix
2 Replies

5. Shell Programming and Scripting

Perl:Use of array elements in pattern matching

I need to use array elements while pattern matching. @myarr = (ELEM1, ELEM2, ELEM3); following is the statement which I am using in my code. Basically I want to replace the ELEM1/2/3 with other thing which is mentioned as REPL here. if (condition) { s/(ELEM1|ELEM2|ELEM3): REPL: /; } I... (3 Replies)
Discussion started by: deo_kaustubh
3 Replies

6. Shell Programming and Scripting

perl DBI: populate a scalar from a select statement

hi every resource i see regarding DBI refers to retrieving data from a database into and array or a hash, but i havent seen anything on how to pull out a single value to a scalar in my database i have a field called "forcewrite" with a value of "6". I am trying to connect to the database,... (2 Replies)
Discussion started by: hcclnoodles
2 Replies

7. Shell Programming and Scripting

Perl Array Elements Replacement

Hello, I have the following perl array: @longname = (Fasthernet0/0 Fasthernet0/1 Serial0/1/0 Serial0/2/1 Tunnel55 Tunnel77) with the followinh array: @shortname = (Fa0/0 Fa0/1 Se0/1/0 Se0/2/1 Tu55 Tu77) in other words, I need to remove the following from each element in the array... (4 Replies)
Discussion started by: ahmed_zaher
4 Replies

8. Shell Programming and Scripting

Help required converting XSD to XML file in PERL

Hi, Please find below the xsd. <?xml version="1.0" encoding="ISO-8859-1" ?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="fruitorder"> <xs:complexType> <xs:sequence> <xs:element name="orderperson"... (2 Replies)
Discussion started by: vanitham
2 Replies

9. Shell Programming and Scripting

Array elements comparison using perl

Experts, I am looking to compare elements of 2 array using perl. Below is not the actual code but logic wise something like this. my $version = "MYSQlcl-5.2.4-264.x86_64"; <-- split this word into array as (5 2 4 264) ( which is to extract only the version number from the package name) my... (1 Reply)
Discussion started by: solaix14
1 Replies

10. Shell Programming and Scripting

Perl : to get the no. of elements from DataDumper

Hello Folks, I have a DataDumper variable and the output of the dataDumper is printed in the below manner. print Dumper \%mnemonics; VAR1 = { 'SYS-7-CLI_SCHEDULER_LOG_STORED' => , 'CRYPTO-6-IKMP_MODE_FAILURE' => , 'AAAA-4-SERVUNDEF' => , ... (1 Reply)
Discussion started by: scriptscript
1 Replies
QCanvasSpline(3qt)														QCanvasSpline(3qt)

NAME
QCanvasSpline - Multi-bezier splines on a QCanvas SYNOPSIS
#include <qcanvas.h> Inherits QCanvasPolygon. Public Members QCanvasSpline ( QCanvas * canvas ) ~QCanvasSpline () void setControlPoints ( QPointArray ctrl, bool close = TRUE ) QPointArray controlPoints () const bool closed () const virtual int rtti () const DESCRIPTION
The QCanvasSpline class provides multi-bezier splines on a QCanvas. A QCanvasSpline is a sequence of 4-point bezier curves joined together to make a curved shape. You set the control points of the spline with setControlPoints(). If the bezier is closed(), then the first control point will be re-used as the last control point. Therefore, a closed bezier must have a multiple of 3 control points and an open bezier must have one extra point. The beziers are not necessarily joined "smoothly". To ensure this, set control points appropriately (general reference texts about beziers will explain this in detail). Like any other canvas item splines can be moved with QCanvasItem::move() and QCanvasItem::moveBy(), or by setting coordinates with QCanvasItem::setX(), QCanvasItem::setY() and QCanvasItem::setZ(). See also Graphics Classes and Image Processing Classes. MEMBER FUNCTION DOCUMENTATION
QCanvasSpline::QCanvasSpline ( QCanvas * canvas ) Create a spline with no control points on the canvas canvas. See also setControlPoints(). QCanvasSpline::~QCanvasSpline () Destroy the spline. bool QCanvasSpline::closed () const Returns TRUE if the control points are a closed set; otherwise returns FALSE. QPointArray QCanvasSpline::controlPoints () const Returns the current set of control points. See also setControlPoints() and closed(). int QCanvasSpline::rtti () const [virtual] Returns 8 (QCanvasItem::Rtti_Spline). See also QCanvasItem::rtti(). Reimplemented from QCanvasPolygon. void QCanvasSpline::setControlPoints ( QPointArray ctrl, bool close = TRUE ) Set the spline control points to ctrl. If close is TRUE, then the first point in ctrl will be re-used as the last point, and the number of control points must be a multiple of 3. If close is FALSE, one additional control point is required, and the number of control points must be one of (4, 7, 10, 13, ...). If the number of control points doesn't meet the above conditions, the number of points will be truncated to the largest number of points that do meet the requirement. Example: canvas/canvas.cpp. SEE ALSO
http://doc.trolltech.com/qcanvasspline.html http://www.trolltech.com/faq/tech.html COPYRIGHT
Copyright 1992-2001 Trolltech AS, http://www.trolltech.com. See the license file included in the distribution for a complete license statement. AUTHOR
Generated automatically from the source code. BUGS
If you find a bug in Qt, please report it as described in http://doc.trolltech.com/bughowto.html. Good bug reports help us to help you. Thank you. The definitive Qt documentation is provided in HTML format; it is located at $QTDIR/doc/html and can be read using Qt Assistant or with a web browser. This man page is provided as a convenience for those users who prefer man pages, although this format is not officially supported by Trolltech. If you find errors in this manual page, please report them to qt-bugs@trolltech.com. Please include the name of the manual page (qcanvasspline.3qt) and the Qt version (3.1.1). Trolltech AS 9 December 2002 QCanvasSpline(3qt)
All times are GMT -4. The time now is 10:57 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy