in reply to insert image to Tk::Text justify question

The syntax for the Tk::Text imageCreate method is $text->imageCreate(index, ?option, value, ...?). The options are:

-align => where -image => image -name => ImageName -padx => pixels -pady => pixels
In your $t->imageCreate ('end',-image => $image ,'right');, the term 'right' does not belong.

Further, the documentation states

The embedded image's position on the screen will be updated as the text is modified or scrolled. Each embedded image occupies one character's worth of index space in the text widget
If you need to force a specific location for the image you'll need to either strictly control the text in the Text widget and the size of that widget, or switch to using a Canvas.